[Asterisk-Users] Extens and number converting so that i can dial
following one standaard.
Greg Hill
gregh-asterisk at hillnet.us
Sun Aug 29 21:40:50 MST 2004
On Sun, 29 Aug 2004, Johannes van Hulst wrote:
> For asterisk I am using more than one sip providers.
> The provider in Holland would like to have the international calls like
> 00 31 20 1234567 but the provider in the US likes it like 0011 31 20 1234567
>
> Can I make a rule in asterisk so that I can dail 00 31 20 1234567 and
> asterisk dails 0011 31 20 1234567 to the US provider?
>
sure. You'd use a Dial() command like this for the provider in Holland:
Dial(SIP/${EXTEN}@HollandProvider)
and something like this for the provider in the US:
Dial(SIP/0011${EXTEN:2}@USProvider)
so to route any extension starting with 0031 through the US provider:
exten => _0031.,1,Dial(SIP/0011${EXTEN:2}@USProvider)
for example. You didn't mention how you want asterisk to know/decide which
of the two providers a particular extension should be routed to. You'll
likely need to write a different exten => line than the sample I gave.
Greg
More information about the asterisk-users
mailing list