My problem is simple and I've issued it about 3 weeks ago. I want the UAs to authenticate with a number to the SIP server. Is this possible? For example, I configured an AT-RG613TX (Allied Telesyn Residential Gateway). In its configuration it is not possible for me to skip specifying a number (ex. 102) along with the username. I've looked into the source code (SIP implementation) of Asterisk and, as I figured out, it is not possible to tell Asterisk the number the user has. The question is: how can I assign a number to a user in Asterisk? One solution would be to define two rules in extensions.conf : exten => 102,1,SetCallerId,${FWDCIDNAME} exten => 102,2,Dial(SIP/pianas) these would tell Asterisk that user pianas has the number 102. Is there any other solution for my problem? (a database for example). Thank you. -- Paul Ianas Programming Engineer Level 7 Software Timisoara, 59D Bucovinei phone: 0744137020 email: paul.ianas@level7.ro -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061024/a2c720d9/attachment.htm
On Tue, Oct 24, 2006 at 10:22:33AM +0300, Paul Ianas wrote:> My problem is simple and I've issued it about 3 weeks ago. I want the > UAs to authenticate with a number to the SIP server. Is this possible? > > For example, I configured an AT-RG613TX (Allied Telesyn Residential > Gateway). In its configuration it is not possible for me to skip > specifying a number (ex. 102) along with the username. I've looked > into the source code (SIP implementation) of Asterisk and, as I > figured out, it is not possible to tell Asterisk the number the user > has. > > The question is: how can I assign a number to a user in Asterisk? One > solution would be to define two rules in extensions.conf : > > exten => 102,1,SetCallerId,${FWDCIDNAME} > > exten => 102,2,Dial(SIP/pianas) > > > these would tell Asterisk that user pianas has the number 102. > > Is there any other solution for my problem? (a database for example).I'm probably misunderstanding the problem. Firstly, you can always use a number as the SIP username if you like: ---- sip.conf ---- [102] ... parameters for phone "102" ---- extensions.conf ---- exten => 102,1,Dial(SIP/102) But this is generally frowned upon, because it's harder to manage in the long term, particularly when people move offices, or you need to change your numbering plan. Many people recommend using the MAC address of the phone as its SIP username, as that is unique and stays with the phone forever. Secondly, when you say "you must specify a number along with the username", you'll have to check how this maps to actual SIP parameters. There is no agreed terminology for this, and many ATAs are really confusing in this regard. For example, I have a Speedtouch 716g router/ATA, and its VoIP parameters are displayed as: Phone Number Caller Name User Name Password Line 1 ____________ ______________ ____________ ___________ Line 2 ____________ ______________ ____________ ___________ By experimentation, I determined that by "Phone Number" it means "SIP ID", the username part of the phone's SIP URI. "Caller Name" is the comment string, and "User Name" is the authentication username. So if I configured it as: Line 1 foo bar baz bap Then I would get: From: "bar" <sip:foo@proxy.com> Contact: <sip:foo@192.168.0.1> and it would authenticate as username 'baz', password 'bap'. Most SIP implementations assume the SIP ID and the auth username are the same, so I have to put the same in columns 1 and 3. (This is true for Asterisk by default; I expect you can change the auth username for a peer but I don't know how) Maybe you're just suffering a similar terminology problem with this ATA. So, if the SIP channel is defined as [pianas] then I'd try entering 'pianas' into both the "phone number" and "user name" fields. If there is a "Caller Name" or "Caller ID" field then you can enter whatever you like there; you could enter 102, or enter Fred Bloggs. Many SIP phones will display the value given by the far end when an incoming call arrives. HTH, Brian.
I think I understood what you want: 1- You want when someone dials an extension, do a Lookup in a database using FWDCIDNAME 2- Then Dial the number that corresponds to this FWDCIDNAME in database is that? If it is so, i would recomend you to use AstDB - Asterisk Berkeley DB (version1) - automatically installed with your asterisk. Example: exten=>_X.,1,Set(NumberToDial=DB(myuserlist/${FWDCIDNAME}) exten=> _X.,2,Dial(SIP/${NumberToDial}) exten=> _X.,3,hangup Take a look on this function and applications on your CLI> show function DB hope it helps. Pls give me some feedback On 10/24/06, Paul Ianas <Paul.Ianas@level7.ro> wrote:> > > > > My problem is simple and I've issued it about 3 weeks ago. I want the UAs to > authenticate with a number to the SIP server. Is this possible? > > > > For example, I configured an AT-RG613TX (Allied Telesyn Residential > Gateway). In its configuration it is not possible for me to skip specifying > a number (ex. 102) along with the username. I've looked into the source code > (SIP implementation) of Asterisk and, as I figured out, it is not possible > to tell Asterisk the number the user has. > > > > The question is: how can I assign a number to a user in Asterisk? One > solution would be to define two rules in extensions.conf : > > > > exten => 102,1,SetCallerId,${FWDCIDNAME} > > exten => 102,2,Dial(SIP/pianas) > > > > these would tell Asterisk that user pianas has the number 102. > > > > Is there any other solution for my problem? (a database for example). > > > > Thank you. > > > > -- > > Paul Ianas > > Programming Engineer > > Level 7 Software > > Timisoara, 59D Bucovinei > > phone: 0744137020 > > email: paul.ianas@level7.ro > > > _______________________________________________ > --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 > > >