[Asterisk-Users] OT: Using Sipsak to reboot a Snom phone < -a nswered my own question

Colin Anderson ColinA at landmarkmasterbuilder.com
Wed Mar 15 11:58:38 MST 2006


Forgot on the Snom 200 it won't reboot if under the Memory tab in the web
interface, Connections > 0 then remote reboot is not possible. Manually
cycling the power allows the phone to be rebooted by Sipsak remotely. 

HOWTO: Reboot a Snom with Sipsak

Checklist:

1. Under Advanced in the web interface, is Network Identity set to 5060?
2. Under Advanced in the web interface, is Challenge for Reboot set to Off?
3. Under Memory in the web interface is the Connections value greater than
0? (If so must manually power cycle)
4. Latest version of Sipsak on your * box

SIP message:

Procedure:

1. Create a file that will send the SIP message. This is a plain text file.
2. All lines in this file must be <CR><LF> format NOT Unix format!
3. Last 2 lines in the file MUST be empty <CR><LF>
4. Contents of the file:

NOTIFY sip:<peer>@<registrar>;user=phone SIP/2.0
Via: SIP/2.0/UDP <registrar>:5060
From: <sip:unknown@<registrar>>
To: <sip:<peer>@<registrar>>
Contact: <sip:<peer>@<registrar>>
Call-ID: 4d61cf9e505d40e905032a18329d61ec at 192-168-1-46 <--this can be
whatever you like. Note the @registrar
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Event: snom-reboot <-- For Snom 2XX models, the event is just "reboot" - for
the 3XX models, this is "snom-reboot"
Content-Length: 0

5. With some fancy bash scripting, you can automatically fill in
<peer><registrar> values, also you can do some grep'ing from asterisk -rx
"SIP SHOW PEERS" to reboot the lot. 

6. Execute Sipsak like this:

sipsak -f <my-custom-sip-file> -s sip:<peer>@<registrar> -H
<ip-of-registrar>

7. Enjoy playing practical jokes on your co-workers


-----Original Message-----
From: Colin Anderson [mailto:ColinA at landmarkmasterbuilder.com]
Sent: Wednesday, March 15, 2006 11:40 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: [Asterisk-Users] OT: Using Sipsak to reboot a Snom phone


I have a custom sip reboot message I am transmitting to a Snom 200 to reboot
it. The Snom gets it, it says "200 OK" but it doesn't reboot. I have turned
off the challenge-reboot option in the Snom. When I modify the "Event:"
directive from "reboot" to "snom-reboot" the phone yields "Bad Event" and
when it is just "reboot" the phone responds with 200 OK, so I know it is
parsing the event properly. Here is a sip trace:

Received from udp:192.168.1.46:34767 at 15/3/2006 11:35:29:070 (363 bytes):

NOTIFY sip:8247 at 192.168.1.46;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.46:34767;rport
Via: SIP/2.0/UDP 192.168.1.46:5060
From: <sip:unknown at 192.168.1.46>
To: <sip:8247 at 192.168.1.46>
Contact: <sip:8247 at 192.168.1.46>
Call-ID: 4d61cf9e505d40e905032a18329d61ec at 192-168-1-46
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Event: reboot
Content-Length: 0


----------------------------------------------------------------------------
----

Sent to udp:192.168.1.46:34767 at 15/3/2006 11:35:29:070 (259 bytes):

SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.1.46:34767;rport=34767
Via: SIP/2.0/UDP 192.168.1.46:5060
From: <sip:unknown at 192.168.1.46>
To: <sip:8247 at 192.168.1.46>
Call-ID: 4d61cf9e505d40e905032a18329d61ec at 192-168-1-46
CSeq: 102 NOTIFY
Content-Length: 0

Anyone have an idea? Christian?
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list