Can anyone help with the use of regexten? (* 1.4.3) I've got Asterisk creating extensions for my SIP phones using regexten but I can't seem to figure out how to make use of them once they're registered. Here's my dialplan for from-sip (the SIP's default context): asterisk*CLI> dialplan show from-sip [ Context 'from-sip' created by 'pbx_config' ] '98766' => 1. Dial(Sip/Tim) [pbx_config] 2. Hangup() [pbx_config] Include => 'sip_autoreg' [pbx_config] Include => 'widgets' [pbx_config] -= 1 extension (2 priorities) in 1 context. =- asterisk*CLI> and here's sip_autoreg (the regexten context): asterisk*CLI> dialplan show sip_autoreg [ Context 'sip_autoreg' created by 'pbx_config' ] '114' => 2. Dial(Sip/Tim) [pbx_config] 3. Hangup() [pbx_config] [ Context 'sip_autoreg' created by 'SIP' ] '112' => 1. Noop(Russell) [SIP] '113' => 1. Noop(Richard) [SIP] '114' => 1. Noop(Tim) [SIP] -= 4 extensions (5 priorities) in 2 contexts. =- asterisk*CLI> Dialing 98766 from Sip/Russell rings Sip/Tim as expected. Dialing 114 gives "Not Found" :-( I'm very confused.... any ideas why this doesn't work? -- Regards, Russell -------------------------------------------------------------------- | Russell Brown | MAIL: russell@lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | --------------------------------------------------------------------
Creating a context in your extensions.conf with the same name as your regcontext will cause all kinds of oddness to happen, among them this. What you need to do is have a differently-named context in extensions.conf with your 2-n priorities and include sip_autoreg in that. Regards, - Brad> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > Russell Brown > Sent: Thursday, November 30, 2006 4:14 AM > To: asterisk-users@lists.digium.com > Subject: [asterisk-users] Trouble with regexten > > > Can anyone help with the use of regexten? (* 1.4.3) > > I've got Asterisk creating extensions for my SIP phones using > regexten but I can't seem to figure out how to make use of > them once they're registered. > > Here's my dialplan for from-sip (the SIP's default context): > > asterisk*CLI> dialplan show from-sip > [ Context 'from-sip' created by 'pbx_config' ] > '98766' => 1. Dial(Sip/Tim) [pbx_config] > 2. Hangup() [pbx_config] > Include => 'sip_autoreg' [pbx_config] > Include => 'widgets' [pbx_config] > > -= 1 extension (2 priorities) in 1 context. =- > asterisk*CLI> > > and here's sip_autoreg (the regexten context): > > asterisk*CLI> dialplan show sip_autoreg > [ Context 'sip_autoreg' created by 'pbx_config' ] > '114' => 2. Dial(Sip/Tim) [pbx_config] > 3. Hangup() [pbx_config] > > [ Context 'sip_autoreg' created by 'SIP' ] > '112' => 1. Noop(Russell) [SIP] > '113' => 1. Noop(Richard) [SIP] > '114' => 1. Noop(Tim) [SIP] > > -= 4 extensions (5 priorities) in 2 contexts. =- > asterisk*CLI> > > Dialing 98766 from Sip/Russell rings Sip/Tim as expected. > > Dialing 114 gives "Not Found" :-( > > I'm very confused.... any ideas why this doesn't work? > > -- > Regards, > Russell > -------------------------------------------------------------------- > | Russell Brown | MAIL: russell@lls.com PHONE: 01780 471800 | > | Lady Lodge Systems | WWW Work: http://www.lls.com | > | Peterborough, England | WWW Play: http://www.ruffle.me.uk | > -------------------------------------------------------------------- > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
________________________________ From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Andrew Joakimsen Sent: Thursday, November 30, 2006 11:56 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Trouble with regexten When using autoreg, is there any way to extract the userid somehow? IE: SIP.com regcontext=registrations [123] regexten=2125551212 extensions.conf [phones] include => registrations exten => _212NXXXXXX,2,Dial(SIP/${VARIABLE})) exten => _212NXXXXXX,3,VoiceMail(u${EXTEN}) Honestly I dont see the point of autoreg unless this can be done... The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061130/c3a1b359/attachment.htm
________________________________ From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Andrew Joakimsen Sent: Thursday, November 30, 2006 11:56 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Trouble with regexten When using autoreg, is there any way to extract the userid somehow? IE: SIP.com regcontext=registrations [123] regexten=2125551212 extensions.conf [phones] include => registrations exten => _212NXXXXXX,2,Dial(SIP/${VARIABLE})) exten => _212NXXXXXX,3,VoiceMail(u${EXTEN}) Honestly I dont see the point of autoreg unless this can be done... The answer is no, but I'm not sure what you're expecting. This is no different than if you weren't using regexten. You would still need a way to map the DID to the proper device. Regards, - Brad The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061130/8c4c1ed4/attachment.htm
Well, I can't pretend to know how other people use it, but perhaps an example of how I use it would be helpful. Most of the sites that I maintain have a pair of boxes that are being loadbalanced (by UltraMonkey: www.ultramonkey.org), so I have no particular way of knowing who is registered to what box beforehand. Obviously, I need to know this. My solution is to use DUNDi and regexten. The DUNDi contexts are mapped into the context where the regextens take place (actually, it's the context where the 2 thru n priorities are, but the regcontext is included) and then I can just do a DUNDILOOKUP to found out the dialing information for any given device. It's simple, it works, and it's a good way to provide redundancy. I belive you may be expecting too much from regexten. It doesn't really do *that* much, but what it does do is useful. Regards, - Brad ________________________________ From: asterisk-users-bounces@lists.digium.com on behalf of Andrew Joakimsen Sent: Thu 11/30/2006 10:02 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Trouble with regexten Because the "REGEXTEN" would be the "phone number" And the Device's userid would be the macaddress, settting regexten should create that association. There used to be an example on the voip-info wiki but its not there anymore. Would someone care to explain what regexten, in its current state, can do that the dialplan can't already do? The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3611 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20061202/45e2b8d4/attachment.bin