[asterisk-users] Calling users to the external domain usingAsterisk

Ricardo Carvalho rjcarvalho at gmail.com
Fri Mar 28 07:55:32 CDT 2008


You can test manually any SRV DNS record using dig, like this:
dig -t SRV _sip._udp.fwd.pulver.com

At the asterisk CLI you can also verify that SRV lookup has been succeeded.
It shows something like this when it does:
parse_srv: SRV mapped to host fwd.pulver.com, port 5060
In your dialplan you can also trigger some Set(CDR(userfield)=SRV call from
${SIPCHANINFO(recvip)}) so that in your mysql CDR table be written which
calls got sent by IP to any SIP URI.

Regards,
Ricardo Carvalho.



On Fri, Mar 28, 2008 at 12:00 PM, Aadilkhan Maniyar <amaniyar at velankani.com>
wrote:

>  Thanks for the reply Recardo..
>
>
>
> I was indeed looking at something like this…
>
>
>
> Also I was also looking at Asterisk's SRV lookups… Is there anyway I can
> know that a SRV lookup has failed?
>
>
>
> Regards,
>
> Aadil
>
>
>
> -----Original Message-----
> *From:* asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] *On Behalf Of *Ricardo Carvalho
> *Sent:* Friday, March 28, 2008 4:07 PM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] Calling users to the external domain
> usingAsterisk
>
>
>
> 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
>
>
>
> _______________________________________________
> -- 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/b57fa499/attachment.htm 


More information about the asterisk-users mailing list