You'll want to dial the second server locally using IAX, and have the second
server call out using ZAP
> [remote-out]
exten => _8NXXNXXXXXX,1,Dial(IAX/x.x.x.x/${EXTEN})
[remote iax] ;in from remote-out
exten => _8NXXNXXXXXX,1,Dial(ZAP/g1/${EXTEN:1},70,T)
if you want to call our back and forth... use a different number for
each and if you don't want the area code change the digit pattern to
reflect it... so that after the 8, it fits the pattern or just use _8.
to accept the whole string.
hope this helps,
Jack
On Fri, 15 Oct 2004 21:04:55 +0200 (CEST), Remco Barende
<asterisk@barendse.to> wrote:> I have set up 2 * servers and connected them via IAX2, the connection
> works, so far so good.
>
> To optimize on the phone bill however I would like to have calls
> that are local for the remote * server placed through the remote server.
>
> How is this accomplished? I first tried the manual approach (dialing an
> 8 would make the call go through the remote * server) but it doesn't
work,
> the call is still placed from the local server.
>
> This is what I put in my extensions.conf:
>
> [remote-out]
> switch => IAX2/user:password@10.10.10.10/pstn-local
> exten => _8.,1,Dial(ZAP/g1/${EXTEN:1},70,T)
> exten => _1NXXNXXXXXX,1,Dial(ZAP/g1/${EXTEN})
> exten => _NXXXXXX,1,Dial(ZAP/g1/${EXTEN})
> exten => _8.,2,Macro(fastbusy)
>
> Ideally I would also like * to strip the area code if the remote server is
> used (it's a local call then) but this is detail. Ultimately I would
like
> to do the same with international calls.
>
> I couldn't find the solution in the wikis.
>
> Thanks all!
> _______________________________________________
> 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
>