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

Barry Miller asterisk-users at notanet.net
Sun Dec 18 22:29:27 CST 2011


On Sat, Dec 17, 2011 at 03:55:55PM -0600, Warren Selby wrote:
> Why not try set a variable under each device in sip.conf to the same as the endpoint name then Dial(SIP/${CustomVar})?

Thanks.  That keeps the device-extension association in one place, at the
cost of a little redundancy if done manually:

  [0010b5c1867c]
  setvar = HEREITISAGAIN=0010b5c1867c
  regexten = 543

I've coded (but not yet seriously tested) an optional feature that would
basically automate just what you suggested.  It'll be interesting to see
how many think this is useful.

> 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



More information about the asterisk-users mailing list