Is there a way to have extensions automatically created for registered sip users ? I did some investigation and found some hope in chan_sip with relation to the somewhat undocumented usereqphone option but i may be totally off track. All i want to be able to do is send a call to number@ip_address where the number is the username configured on the phone that has registered with asterisk on ip_address. From what I understand this should be pretty standard sip functionality no ? Regards, Nathan.
On Thu, 2006-02-23 at 16:46 +0800, Nathan Alberti wrote:> Is there a way to have extensions automatically created for > registered sip users ? >in sip.conf regcontext=sipregistrations that adds them to sipregistrations, you can make that anything you want however I am willing to bet there might be problems if its named something else (although that may not be the case). -- Trixter http://www.0xdecafbad.com Bret McDanel UK +44 870 340 4605 Germany +49 801 777 555 3402 US +1 360 207 0479 or +1 516 687 5200 FreeWorldDialup: 635378 http://www.sacaug.org/ Sacramento Asterisk Users Group -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060223/09b177e5/attachment.pgp
On 23/02/2006, at 4:56 PM, trixter aka Bret McDanel wrote:> On Thu, 2006-02-23 at 16:46 +0800, Nathan Alberti wrote: >> Is there a way to have extensions automatically created for >> registered sip users ? >> > in sip.conf > regcontext=sipregistrations > > that adds them to sipregistrations, you can make that anything you > want > however I am willing to bet there might be problems if its named > something else (although that may not be the case). >Yep, that works, thanks Bret. It seems pretty basic though, it does not seem to remove the entry if the peer becomes unreachable nor does it remove the entry if the user is removed from sip.conf and a full reload (or reload chan_sip). It seems the only way to rebuild the context is a full restart. Worth submitting a bug over ? Nathan.
[dial] exten => _X.,1,Dial(SIP/${EXTEN}) exten => _X.,2,Congestion exten => _X.,102,Busy -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Nathan Alberti Sent: Thursday, February 23, 2006 9:46 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] username as extension Is there a way to have extensions automatically created for registered sip users ? I did some investigation and found some hope in chan_sip with relation to the somewhat undocumented usereqphone option but i may be totally off track. All i want to be able to do is send a call to number@ip_address where the number is the username configured on the phone that has registered with asterisk on ip_address. From what I understand this should be pretty standard sip functionality no ? Regards, Nathan. _______________________________________________ --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
Nathan Alberti wrote:> Is there a way to have extensions automatically created for registered > sip users ? > > I did some investigation and found some hope in chan_sip with relation > to the somewhat undocumented usereqphone option but i may be totally > off track. > > All i want to be able to do is send a call to number@ip_address where > the number is the username configured on the phone that has registered > with asterisk on ip_address. > > From what I understand this should be pretty standard sip > functionality no ? >dial(SIP/username@hostname) works very well in the dial plan. If you enable "autocreatpeer" anyone can register anything in your server without bothering with passwords. I don't need to add that this is highly insecure, so I won't mention that. /Olle
You want regexten/regcontext in sip.conf under each peer. http://www.voip-info.org/wiki-Asterisk+sip+regcontext -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Nathan Alberti Sent: Thursday, 23 February 2006 7:46 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] username as extension Is there a way to have extensions automatically created for registered sip users ? I did some investigation and found some hope in chan_sip with relation to the somewhat undocumented usereqphone option but i may be totally off track. All i want to be able to do is send a call to number@ip_address where the number is the username configured on the phone that has registered with asterisk on ip_address. From what I understand this should be pretty standard sip functionality no ? Regards, Nathan. _______________________________________________ --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
On 24/02/2006, at 5:40 AM, Mike Pollitt wrote:> You want regexten/regcontext in sip.conf under each peer. > > http://www.voip-info.org/wiki-Asterisk+sip+regcontext > >Yes, thats exactly what I want. the scenario is i have two asterisk boxes. box one (10.0.1.1) has a phone that registers as 1000 box two (10.0.2.1) has a phone that registers as 2000 I want to be able to call 1000@10.0.2.1 and 2000@10.0.2.1. Now i realise I can add an extension similar to this exten => 1000,1,Dial(Sip/100) But I just want it to somewhat dynamic so if 1000 registers on 10.0.1.1 I can easily send it a call with the Dial(SIP/1000@10.0.2.1) from box two (or another box). regexten is basically what I want but as stated earlier is has some shortcomings in the face that you must restart (not reload) asterisk when the state of a sip peer changes. Regards, Nathan.