Aadilkhan Maniyar
2008-Mar-27 07:47 UTC
[asterisk-users] Calling users to the external domain using Asterisk
Hi All, I am a newbie to Asterisk. Presently I am working with Asterisk 1.4.17 and using it to make SIP calls. I have a configuration of Asterisk which serves the users in a particular domain, say internal.com I would like to make a SIP call from bob at internal.com to charles at external.com I have added the following lines in extensions.conf exten => charles,1,Dial(SIP/${EXTEN}@external.com) exten => charles,2,Hangup Asterisk does a DNS SRV lookup and resolves the external.com to its proper IP and calls are established. But the problem with the above configuration is that I have manually added users that are in the external domain. Is there any way wherein I can call the users in external.com without adding them in the extensions.conf? Any help would be appreciated. Thanks, Aadil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080327/6af7770e/attachment.htm
Mojo with Horan & Company, LLC
2008-Mar-27 18:47 UTC
[asterisk-users] Calling users to the external domain using Asterisk
Aadilkhan Maniyar wrote:> Hi All, > > I am a newbie to Asterisk. Presently I am working with Asterisk 1.4.17 > and using it to make SIP calls. > I have a configuration of Asterisk which serves the users in a > particular domain, say internal.com > I would like to make a SIP call from bob at internal.com to > charles at external.com > I have added the following lines in extensions.conf > exten => charles,1,Dial(SIP/${EXTEN}@external.com) > exten => charles,2,Hangup > > Asterisk does a DNS SRV lookup and resolves the external.com to its > proper IP and calls are established. > But the problem with the above configuration is that I have manually > added users that are in the external domain. > > Is there any way wherein I can call the users in external.com without > adding them in the extensions.conf? > > Any help would be appreciated. > > Thanks, > Aadil > > > > ------------------------------------------------------------------------ > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-usersI could be wrong about this, but isn't that what a switch statement is for? So you might check to see if the dialed number is local to internal.com, then you might do a switch statement to external.com's dialplan if it wasn't local? moj
Ricardo Carvalho
2008-Mar-28 10:36 UTC
[asterisk-users] Calling users to the external domain using Asterisk
What you are looking for is something like this piece of code. Adapt it for your scenario: [default] exten => _.,1,NoOp(incomming call from ${CALLERID} to ${EXTEN}@${SIPDOMAIN}) exten => _.,2,GotoIf($[${LEN(${SIPDOMAIN})} = 0]?10) exten => _.,3,GotoIf($[${SIPDOMAIN} = ${MYDOMAIN}]?10) exten => _.,4,GotoIf($[${SIPDOMAIN} = ${MYFQDN}]?10) exten => _.,5,GotoIf($[${SIPDOMAIN} = ${MYFQDN}:5060]?10) exten => _.,6,GotoIf($[${SIPDOMAIN} = 192.168.1.1]?10) exten => _.,7,NoOp(@${SIPDOMAIN} is from an external domain, sending to it...) exten => _.,8,Dial(SIP/${EXTEN}@${SIPDOMAIN}) exten => _.,9,HangUp() exten => _.,10,Goto(noturi-default,${EXTEN},1) exten => h,1,HangUp() [noturi-default] ;(your dialplan) Regards, Ricardo Carvalho. On Thu, Mar 27, 2008 at 7:47 AM, Aadilkhan Maniyar <amaniyar at velankani.com> wrote:> Hi All, > > > > I am a newbie to Asterisk. Presently I am working with Asterisk 1.4.17 and > using it to make SIP calls. > > I have a configuration of Asterisk which serves the users in a particular > domain, say internal.com > > I would like to make a SIP call from bob at internal.com to > charles at external.com > > I have added the following lines in extensions.conf > > exten => charles,1,Dial(SIP/${EXTEN}@external.com<SIP/$%7BEXTEN%7D at external.com> > ) > > exten => charles,2,Hangup > > > > Asterisk does a DNS SRV lookup and resolves the external.com to its proper > IP and calls are established. > > But the problem with the above configuration is that I have manually added > users that are in the external domain. > > > > Is there any way wherein I can call the users in external.com without > adding them in the extensions.conf? > > > > Any help would be appreciated. > > > > Thanks, > Aadil > > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080328/6eef67e4/attachment.htm