Features/Auto Provisioning/PnP
From Snom User Wiki
Overview Plug & Play
Plug & Play (PnP) provides a proprietory method to enable "Auto Provisioning" on all snom VoIP phones EXCEPT snom m3,. By default (Parameter pnp config = on) the phones send SIP SUBSCRIBES messages to a multicast address. Any SIP server understanding that message may reply with a SIP NOTIFY message containing the Auto Provisioning Server URL where the phones can request their configuration from.
SIP Flow
snom3x0/snom8xx phones send on boot-up a SIP SUBSCRIBE message to a multicast address:
Sent to udp:224.0.1.75:5060 at 24/12/2001 00:00:19:248 (448 bytes): SUBSCRIBE sip:MAC%3a00135E874B49@intern.snom.de SIP/2.0 Via: SIP/2.0/UDP 192.168.10.67:5060;rport From: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=658512961 To: <sip:MAC%3a00135E874B49@intern.snom.de> Call-ID: 1930770594@192.168.10.67 CSeq: 1 SUBSCRIBE Event: ua-profile;profile-type="device";vendor="OEM";model="OEM";version="7.1.19" Expires: 0 Accept: application/url Contact: <sip:192.168.10.67:5060> Content-Length: 0
If any SIP application within one hop range understands this message a confirmation is sent:
Received from udp:192.168.100.10:5060 at 24/12/2001 00:00:19:287 (480 bytes): SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.10.67:5060;rport=5060 Record-Route: <sip:127.0.0.1;lr;transport=tcp;route-id=fb4fb92b7775c2a7> Record-Route: <sip:192.168.100.10;lr;transport=UDP;route-id=fb4fb92b7775c2a7> Contact: <sip:192.168.100.10;transport=TCP;handler=dum> To: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=91955270 From: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=658512961 Call-ID: 1930770594@192.168.10.67 CSeq: 1 SUBSCRIBE Expires: 0 Content-Length: 0
followed by a SIP NOTIFY message containing the Auto Provisioning URL "http://192.168.100.10/sipphone/sipphoneconfig.xml?mac={mac}":
Received from udp:192.168.100.10:5060 at 24/12/2001 00:00:19:293 (868 bytes): NOTIFY sip:192.168.10.67:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.100.10:5060;branch=z9hG4bK-d8754z-c3ea5f0e74462613-1---d8754z-;rport Via: SIP/2.0/TCP 127.0.0.1:5060;branch=z9hG4bK-d8754z-7ca96c30144f3e04-1---d8754z-;rport=40916 Max-Forwards: 20 Record-Route: <sip:192.168.100.10;lr;route-id=e3470eb400e9c0a4> Record-Route: <sip:127.0.0.1;lr;transport=TCP;route-id=e3470eb400e9c0a4> Contact: <sip:192.168.100.10;transport=TCP;handler=dum> To: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=658512961 From: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=91955270 Call-ID: 1930770594@192.168.10.67 CSeq: 3 NOTIFY Content-Type: application/url Subscription-State: terminated;reason=timeout Event: ua-profile;profile-type="device";vendor="OEM";model="OEM";version="7.1.19" Content-Length: 59 http://192.168.100.10/sipphone/sipphoneconfig.xml?mac={mac}
The phone accepts this message and confirms:
Sent to udp:192.168.100.10:5060 at 24/12/2001 00:00:19:315 (542 bytes): SIP/2.0 200 Ok Via: SIP/2.0/UDP 192.168.100.10:5060;branch=z9hG4bK-d8754z-c3ea5f0e74462613-1---d8754z-;rport=5060 Via: SIP/2.0/TCP 127.0.0.1:5060;branch=z9hG4bK-d8754z-7ca96c30144f3e04-1---d8754z-;rport=40916 Record-Route: <sip:192.168.100.10;lr;route-id=e3470eb400e9c0a4> Record-Route: <sip:127.0.0.1;lr;transport=TCP;route-id=e3470eb400e9c0a4> From: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=91955270 To: <sip:MAC%3a00135E874B49@intern.snom.de>;tag=658512961 Call-ID: 1930770594@192.168.10.67 CSeq: 3 NOTIFY Content-Length: 0
Test Tool
Our development provides a tool (Python Script) which can be installed on any OS platform which is supported by Python. The script will reply to any phone within the network, so please test it thoroughly before applying it to a live environment.
Installation
- Download updated PnP Server Application from Sourceforge
- Download Standard Python Software and install it
Usage
python pnpserv.py -u http://url.of.the/settings.xml?mac={mac}
python pnpserv.py -u w/o argument defaults to "http://provisioning.snom.com/snom3x0/snom3x0.php?mac={mac}" pnpserv.py -h --> prints the help pnpserv.py -v --> verbose mode