[asterisk-users] Hint for realtime peers

Leif Neland leifn at neland.dk
Sat Jan 16 14:28:14 CST 2010


Tilghman Lesher skrev:
> On Saturday 16 January 2010 11:02:52 Deep D wrote:
>   
>> On Sat, Jan 16, 2010 at 9:21 PM, Tilghman Lesher <tlesher at digium.com> wrote:
>>     
>>> On Saturday 16 January 2010 06:04:01 Deep D wrote:
>>>       
>>>> When I create a sip peer  in users.conf then a hint is automatically
>>>> created for that peer. But when I create a peer in sip.conf or a
>>>> realtime peer with the same values then this hint is not created.
>>>> Every time I add such peers I have to add a hint in extensions.conf.
>>>>
>>>> Is it possible to have something like   exten =>
>>>> _XXX,hint,SIP/${EXTEN}   in extensions.conf so that I don't have to
>>>> add hint for each sip peer I create?
>>>>         
>>> Only in 1.6.1 and later.  The hints will grow, as phones subscribe to
>>> them, one entry per hint, automatically.
>>>       
>> I tried this in asterisk 1.6.1.1 by adding the line exten =>
>> _XXX,hint,SIP/${EXTEN} to the default context, but it did not work.
>>
>> I gave the following commands through the manager interface
>>
>> action: extensionstate
>> exten: 777
>>
>> and the response was
>>
>> Response: Success
>> Message: Extension Status
>> Exten: 777
>> Context: default
>> Hint: SIP/${EXTEN}
>> Status: 0
>>
>> I am always getting a Status: 0 for any value of exten. I think the
>> variable ${EXTEN} is not being evaluated to its value.
>>     
>
> That's not a subscription.  You must actually get a phone to subscribe to
> the hint before it is created.
>
>   
Might be true for "dynamic" hints.
But for static hints it's not.

> arnold*CLI> core show hints
> arnold*CLI>
>     -= Registered Asterisk Dial Plan Hints =-
>                       6 at hintcontext         : SIP/6                 
> State:Idle            Watchers  0
>                       5 at hintcontext         : SIP/jesperfon         
> State:Idle            Watchers  1
I have several "unused" hints.

Leif




More information about the asterisk-users mailing list