[Asterisk-Users] SIP NOTIFY Message

John Todd jtodd at loligo.com
Tue May 6 16:38:16 MST 2003


There are two solutions in the message I include below.

1) There's a quickie perl script by Jared Mauch.  I'm sure it's 
modifiable to your purposes instead of the "check-sync" specific call.

2) There is a URL link to a Cisco 79xx manager program made by the 
Vovida project.  Don't know if this applies to you, but worth 
including.

3) I don't think SIP supports broadcast NOTIFY messages ("broadcast" 
being use of the IP broadcast address for SIP messages) but I don't 
feel like reading the RFC again to verify.  So you're stuck with 
doing it one-at-a-time.


JT

>any way the you can get * to send a NOTIFY SIP message to all SIP 
>phones?  to have the SIP sets recheck thier configs etc??
>
>Like this?
>
>NOTIFY sip:sip at 192.168.0.3:5060 SIP/2.0
>Via: SIP/2.0/UDP ipaddress:5060;branch=1
>Via: SIP/2.0/UDP ipaddress
>From: <sip:webadim at 192.168.0.1>
>To: <sip:sip at 192.168.0.3>
>Event: check-sync
>Date: Mon, 10 Jul 2000 16:28:53 -0700
>Call-ID: test at 192.168.0.1
>CSeq: 1300 NOTIFY
>Contact: <sip:webadmin at 192.168.0.1>
>Content-Length: 0
>
>
>
>Dave
>
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users





>Date: Thu, 10 Apr 2003 20:28:36 -0400
>From: Jared Mauch <jared at puck.nether.net>
>To: INOC-DBA discussion list <inoc-dba at pch.net>
>Subject: Re: [INOC-DBA]  Any one out there that can register new phones to the
>	INOC-DBA  server?
>Reply-To: INOC-DBA discussion list <inoc-dba at pch.net>
>
>On Thu, Apr 10, 2003 at 02:07:07PM -0700, John Todd wrote:
>>  >      On Thu, 10 Apr 2003, John Todd wrote:
>>  >    > I may not have a clear understanding of it, but isn't that what the
>>  >    > "sync.xml" file and triggered NOTIFY is for?
>>  >
>>  >Sounds like what we need...
>>  >
>>  >    > There are more details on the Cisco site that specify how the
>>  >    > sync.xml file is configured...
>>  >
>>  >The search thing on their web site isn't finding anything...  Pointers?
>>  >
>>  >                                -Bill
>>
>
>	This works:
>
>	Just hacked it up and tested it a bunch.
>
>	going to do one last quick test.  if the code has to
>change i'll let you know.
>
>	just fyi:
>
>	204.42.254.13 = workstation
>	204.42.254.14 = ip phone
>	1005 = ip phone number
>
>	going to test it w/ instead of 204.42.254.14, the ip of the
>sip server.  should work just as well.  Had to add in the Via line
>as the sip server complained about it being missing.
>
>punk:~> cat sip_boot.pl
>#!/usr/bin/perl
>use Socket;
>
>reboot_sip_phone("204.42.254.14", "204.42.254.13", "1005");
>
>sub reboot_sip_phone {
>     $phone_ip = shift;
>
>$local_ip = shift;
>$sip_to = shift;
>$sip_from = "0";
>$tm = time();
>$call_id = $tm ."msgto$sip_to";
>
>$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: Thu, 10 Apr 2003 21:26:53 -0000
>Call-ID: $call_id\@$local_ip
>CSeq: 1300 NOTIFY
>Contact: <sip:$sip_from\@$local_ip>
>Content-Length: 0
>
>";
>
>
>$proto = getprotobyname('udp');
>socket(SOCKET, PF_INET, SOCK_DGRAM, $proto) ;
>$iaddr = inet_aton("$phone_ip");
>$paddr = sockaddr_in(5060, $iaddr);
>bind(SOCKET, $paddr)   ;
>$port=5060;
>
>$hisiaddr = inet_aton($phone_ip)  ;
>$hispaddr = sockaddr_in($port, $hisiaddr);
>
>send(SOCKET, $MESG, 0,$hispaddr  ) || warn "send $host $!\n";
>
>
>}
>
>>
>>  Search on syncinfo.xml on Google instead of my (mistakenly)
>>  abbreviated term that I gave you previously.  A cursory examination
>>  doesn't find the exact format of the syncinfo.xml file that I had
>>  previously downloaded, but I'm sure with some more vigorous Googling
>>  it will reveal itself.
>>
>>  http://www.vovida.org/downloads/siptiger/sip_tiger_2.3.1_readme.txt
>>
>>  This is a 7960-specific tool from the Vovida folks; I haven't used
>>  it, but it seems that they have a syncinfo controller in there
>>  somewhere (from looking at the docs)  The Vovida software is normally
>>  BSD licensed, as well, for whoever was asking about that...
>>
>>  JT
>  > _______________________________________________
>>  inoc-dba mailing list
>>  inoc-dba at pch.net
>>  https://www.pch.net/mailman/listinfo.cgi/inoc-dba
>
>--
>Jared Mauch  | pgp key available via finger from jared at puck.nether.net
>clue++;      | http://puck.nether.net/~jared/  My statements are only mine.
>_______________________________________________
>inoc-dba mailing list
>inoc-dba at pch.net
>https://www.pch.net/mailman/listinfo.cgi/inoc-dba




More information about the asterisk-users mailing list