[Asterisk-Users] Re: 2 servers

David Cook dbc_asterisk at advan.ca
Mon Sep 27 05:58:01 MST 2004


Quoting asterisk-users-request at lists.digium.com:

> Good day all
> I got my 2 asterisk servers talcking 2 each other using iax and sip
> thanks to davids doc here
> But...
> Only one box's has a zaptel card in!
> How do I get users from the other box to dial out threw the server
> with
> the card in?
> Thanks
> ALtus
Sorry, didn't read the post completely - my bad!

You need to add an extension macro in the sending server something like
this:
exten =>
_9.,Dial(IAX2/REC_SERVER:mysecret at my.receiving.server.ca/${EXTEN}@local

exten => _9.,2,Hangup
exten => _9.,102,Hangup

This will all calls beginning with "9" to go to the receiving server and
be deposited into the "local" context. This would mean you can have
_no_ extensions on the local machine that begin with a 9. You can
change this to be any pattern format you like but it must be mutually
exclusive to your local switch. You then need to have a similar entry
in the receiving server's extensions.conf file (in the correct context
where these calls are going) to pickup those calls and dial out on the
Zap interface like the following for 9+10 digit dialing:

LOCALTRUNK=Zap/g1                               ; Trunk interface

[dial-local-from-PSTN-forced]
; dial out local 10 digit calls forced from the PSTN group and strip the
'9'
exten => _9NXXNXXXXXX,1,Dial(${LOCALTRUNK}/${EXTEN:1},30,tr)
exten => _9NXXNXXXXXX,2,Hangup
exten => _9NXXNXXXXXX,102,Congestion
exten => _9NXXNXXXXXX,103,Hangup



dbc
--
David Cook



More information about the asterisk-users mailing list