[asterisk-users] Which device auto-registered an extension?

Olle E. Johansson oej at edvina.net
Sat Dec 17 06:22:13 CST 2011


16 dec 2011 kl. 18:12 skrev Barry Miller:

> On Fri, Dec 16, 2011 at 05:02:11PM +0100, Olle E. Johansson wrote:
>> 
>> 16 dec 2011 kl. 02:03 skrev Barry Miller:
>> 
>>> So is there a way for the dialplan to determine which device caused SIP to
>>> auto-register an extension?
>> 
>> Not really, unless someone else can come up with something. 
>> 
>> In Asteirsk, the extension hints are the connection from the dialplan to a device,
>> used for subscriptions and blinking lamps.
>> 
>> exten => 543,hint,SIP/devabc
>> 
>> then you can use
>> 
>> exten=> _5XX,DIAL(/${HINT})
>> 
>> Which opens up the question on how you enter all the hints...
>> 
>> I know Tilghman added something clever recently to new versions of Asterisk, but I 
>> haven't used it myself so I can't describe how it works.
> 
> Thanks.  I like to keep devices and extensions separate, for security reasons, and it's a
> pain having to define the association in different places, especially when sip.conf seems
> like the logical place to do this.  Do you think if I were to code up a function like
> AUTOREG([context,]exten) that returned 1 for auto-registered extensions, 0 otherwise, and
> set a channel variable to the registering device name, it might be useful enough to be
> accepted as a feature?


I would assume that to extend regexten with reghint and have a similar functionality
where we add a hint to an extension at registration would work nicely within the 
current architecture.

/O


More information about the asterisk-users mailing list