[Asterisk-Users] Polycom Reboot Script
    Matthew T. O'Connor 
    matthew at zeut.net
       
    Sun Aug 28 22:21:38 MST 2005
    
    
  
Hello, I'm trying to setup the revised Polycom remote reboot script as 
found on:
http://www.voip-info.org/tiki-index.php?page=Polycom+reboot+hardphone+script
I'm not sure how to use this script, it's just a perl script, so I tried 
creating an executable perl script and running it, but I get the following:
[root at asterisk1 agi-bin]# ./polycom_reboot.pl 192.168.3.205
Checking ARP table.
192.168.3.205 is reachable.
checking for polycom config name...
touching config file /home/polycom/0004f201d398.cfg
Use of uninitialized value in concatenation (.) or string at 
./polycom_reboot.pl line 97, <ARP> line 3.
Use of uninitialized value in concatenation (.) or string at 
./polycom_reboot.pl line 99, <ARP> line 3.
Use of uninitialized value in concatenation (.) or string at 
./polycom_reboot.pl line 99, <ARP> line 3.
reboot of phone 192.168.3.205 was successful
While it does say it is successful, I can tell you the phone does NOT 
reboot. 
line 97 looks like this:
    $call_id  = $tm . "msgto$sip_to";
It's part of this sub routine:
sub reboot_sip_phone {    # Send the phone a check-sync to reboot it
    $phone_ip = shift;
    $local_ip = shift;
    $sip_to   = shift;
    $sip_from = "asterisk";
    $tm       = time();
    $call_id  = $tm . "msgto$sip_to";
    $httptime = `date -R`;
    $MESG     = "NOTIFY sip:$sip_to\@$phone_ip:5060 SIP/2.0
Via: SIP/2.0/UDP $local_ip
From: <sip:$sip_from\@$local_ip>
To: <sip:$sip_to\@$phone_ip>
Event: check-sync
Date: $httptime
Call-ID: $call_id\@$local_ip
CSeq: 1300 NOTIFY
Contact: <sip:$sip_from\@$local_ip>
Content-Length: 0
";
Any Ideas?
Thanks,
Matt O'Connor
    
    
More information about the asterisk-users
mailing list