Barry Miller
2011-Dec-16  01:03 UTC
[asterisk-users] Which device auto-registered an extension?
Hi all,
In sip.conf:
  [general]
  regcontext = autoreg
  [devabc]
  regexten = 543
creates "exten=> 543,1,Noop(devabc)" in context autoreg when devabc
registers.  But I can't use "exten=> _5XX,2,Dial(SIP/${EXTEN})"
in the
dialplan, because there's no device SIP/543.  Now I know I can add a line
like "exten=> 543,2,Dial(SIP/devabc)" for each and every device
that uses
regexten, but it would be a lot cleaner to be able to use something like
Dial(SIP/${WHAT_GOES_HERE?}) instead.
So is there a way for the dialplan to determine which device caused SIP to
auto-register an extension?
-- 
Barry
Olle E. Johansson
2011-Dec-16  16:02 UTC
[asterisk-users] Which device auto-registered an extension?
16 dec 2011 kl. 02:03 skrev Barry Miller:> Hi all, > > In sip.conf: > [general] > regcontext = autoreg > > [devabc] > regexten = 543 > > creates "exten=> 543,1,Noop(devabc)" in context autoreg when devabc > registers. But I can't use "exten=> _5XX,2,Dial(SIP/${EXTEN})" in the > dialplan, because there's no device SIP/543. Now I know I can add a line > like "exten=> 543,2,Dial(SIP/devabc)" for each and every device that uses > regexten, but it would be a lot cleaner to be able to use something like > Dial(SIP/${WHAT_GOES_HERE?}) instead. > > 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. /O ----- IPv6 Friday again! Woot! http://ipv6friday.org
Warren Selby
2011-Dec-17  21:55 UTC
[asterisk-users] Which device auto-registered an extension?
Why not try set a variable under each device in sip.conf to the same as the
endpoint name then Dial(SIP/${CustomVar})?
Thanks,
--Warren Selby, dCAP
On Dec 15, 2011, at 7:03 PM, Barry Miller <asterisk-users at notanet.net>
wrote:
> Hi all,
> 
> In sip.conf:
>  [general]
>  regcontext = autoreg
> 
>  [devabc]
>  regexten = 543
> 
> creates "exten=> 543,1,Noop(devabc)" in context autoreg when
devabc
> registers.  But I can't use "exten=>
_5XX,2,Dial(SIP/${EXTEN})" in the
> dialplan, because there's no device SIP/543.  Now I know I can add a
line
> like "exten=> 543,2,Dial(SIP/devabc)" for each and every
device that uses
> regexten, but it would be a lot cleaner to be able to use something like
> Dial(SIP/${WHAT_GOES_HERE?}) instead.
> 
> So is there a way for the dialplan to determine which device caused SIP to
> auto-register an extension?
> 
> -- 
> Barry
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users