Martin Roy
2005-May-26  10:49 UTC
[Asterisk-Users] Using zap channels on 2 different servers
Let say I have a server located in Europe and one in North America. The 2 servers are connected together with iax2. Both server are connected to phone lines in there own country. If I want that when a user call a north american phone number from the server in Europe it use a zap channel on the server located in North America and also if someone in North America dial an European phone number it use a zap channel on the server in Europe how can I setup this? Currently it's configure that when a user press 9 and enter the number to dial it takes a local zap channels to dial out. I figured easily how to call a remote extension as I use a different range of extensions for both site but can I use remote zap channels the same way? Thanks Martin
Colin Anderson
2005-May-26  11:25 UTC
[Asterisk-Users] Using zap channels on 2 different servers
You use pattern matching in extensions.conf to determine where the call is
to go. In North America, you dial 1+3+3+4 digits for LD and 3+4 for local.
In Europe, you dial 3+3+3 between countries or 3+3 in the same country* ,
so, 
EUROPEAN SERVER:
[outbound]
exten => _9XXXXXXX,1,Dial(IAX2/europeuser:mypassword@americaserver/${exten})
'Local north america calling 3+4 digit
exten =>
_9XXXXXXXXXXX,1,Dial(IAX2/europeuser:mypassword@americaserver/${exten}) 'LD
north america calling 1+3+3+4 digit)
AMERICA SERVER:
[outbound]
exten => _9XXXXXX,1,Dial(IAX2/americauser:mypassword@europeserver/${exten})
'Local europe calling 3+3 digit
exten =>
_9XXXXXXXXX,1,Dial(IAX2/americauser:mypassword@europeserver/${exten})
'Cross-country europe calling 3+3+3 digit)
In this example, the X's mean any digit. If you count the number of X's,
you
get 7 digits for NA local, 11 for LD, 6 for European local, 9 for European
LD. 
In both of these examples, dialing 9 before the number is assumed. Also, it
is assumed that IAX.CONF on both servers is set up correctly to dump the
inbound IAX call into a context that has access to the ZAP channels of the
respective server. 
You could also modify this so if they dial 8 first, for example, it would
always go to Europe or vice versa. But then it becomes a user training
issue. If you just tell them to dial 9 + the number then Asterisk will
figure out the rest. 
hth
*It's my understanding that there are exceptions in certain European
countries. You will have to figure out those execptions. 
-----Original Message-----
From: Martin Roy [mailto:mroy@mac.com]
Sent: Thursday, May 26, 2005 11:49 AM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] Using zap channels on 2 different servers
Let say I have a server located in Europe and one in North America.  
The 2 servers are connected together with iax2.
Both server are connected to phone lines in there own country.
If I want that when a user call a north american phone number from  
the server in Europe it use a zap channel on the server located in  
North America and also if someone in North America dial an European  
phone number it use a zap channel on the server in Europe how can I  
setup this?
Currently it's configure that when a user press 9 and enter the  
number to dial it takes a local zap channels to dial out.
I figured easily how to call a remote extension as I use a different  
range of extensions for both site but can I use remote zap channels  
the same way?
Thanks
Martin
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users