[Asterisk-Users] Extension Lights Patch

Dan Perik dan_perik at ntm.org
Wed Jul 20 15:05:44 MST 2005


Matt Loretitsch wrote:

>I wish someone would just post a sample extensions.conf so I could
>FINALLY understand this.  Could you post at least the hint portion of
>yours?  I have tried this repeatedly without success and am starting to
>feel like a true idiot.
>
>Is it something like this?
>
>exten => 2352,hint,SIP/2352
>
>That's what I've been trying.  I also made sure the buddy watch was
>turned on.  IP501 phone.  Sip.conf has the sip channel defined as [2352]
>and not by user name.
>
>Thanks!
>-Matt
>
>  
>
Here's my hint "stuff".

exten => 501,hint,SIP/spa1
exten => 502,hint,SIP/sipura2000-1
exten => 503,hint,SIP/pc1
exten => 510,hint,SIP/pc2

spa1 is a Sipura 3000 FXS port.
sipura2000-1 is a Sipura 2000 FXS port.
pc1 and pc2 are Polycom 501 "lines".

Here's how I understand how it works.  The "phone" requesting to be
notified about another "phone"'s status does a SIP SUBSCRIBE for that
extension.  Asterisk looks up that extension's hint priority to find out
which device to monitor status for.  When Asterisk senses the monitored
device's status change, it sends a notify to the "phone(s)" that had
subscribed to the device's presence.

So basically, the hint priority ties together an "extension" and a
"device"/"channel".

It looks like you have it right.  Note that for the Polycom at least, in
sip.conf you _have_ to have the Polycom's line 1 information _last_, if
you have more than one line registered on the Polycom.  This is because
the Polycom uses the credentials for the first line when it
authenticates the SIP SUBSCRIBE request.  But Asterisk looks up the
credentials for SIP SUBSCRIBE requests according to IP, and uses the
first one it finds, which is the last one defined in sip.conf.  At least
it was in my case... and I banged my head against chan_sip.c for a
number of hours getting this figured out.

If you still have problems, what do you see on the Asterisk CLI at a
decently high verbosity, when you set "Watch Buddy" to "enabled"?

- Dan



More information about the asterisk-users mailing list