[Asterisk-Users] IAX2 Trunking help!

Paul Mahler pmahler at signate.com
Tue Jun 22 21:03:39 MST 2004


The register statement informs a remote * server of the location of the
local * server. If the local server is always at the same IP address, there
is no need to register with the remote server. IAX will work just fine with
no register statements at either side. 

Here is a typical iax.conf configuration to allow incoming connections from
a remote * server. This is from a working installation. 

; Inter-Asterisk eXchange driver definition (asterisk2)

 [general]
 port=4569
 accountcode=lss0101
 bandwidth=low
 allow=g723
 allow=g729
 disallow=lpc10
 allow=gsm 
 tos=lowdelay

 [asterisk]
 type=friend
 auth=md5
 secret=1945
 context=local
 host=dynamic
 defaultip=10.1.1.180
 qualify=yes

This statement at the remote * server would dial the local server with the
configuration shown above. Incoming calls would be directed to the "local"
context in extensions.conf. 

exten => _1XXX,1,Dial(IAX2/asterisk:1945 at 10.1.1.180/${EXTEN}@local)



Paul Mahler 
pmahler at signate.com 	
Signate, LLC
665 Third Street
Suite 100
San Francisco, CA
 94107-1901

 Asterisk Services and Training

 

 

 

 

> -----Original Message-----
> From: asterisk-users-admin at lists.digium.com 
> [mailto:asterisk-users-admin at lists.digium.com] On Behalf Of David Cook
> Sent: Tuesday, June 22, 2004 5:48 AM
> To: asterisk-users at lists.digium.com
> Subject: Re: [Asterisk-Users] IAX2 Trunking help!
> 
> I was just trying to solve this one myself. I found this 
> method worked for me. I'm still calling this "Method 1" in my 
> document because I don't fully understand the "switch" and 
> the "register" versions and pros/cons to implementation of 
> each. But this one does work.
> 
> Method 1
> Receiving Server
> Iax.conf
> [REC_SERVER]
> type=user
> host=my.calling.server.ca
> secret=mysecret
> context=local
> trunk=yes
> 
> Calling Server
> Extensions.conf
> [mycontext]
> exten =>
> _5XXX,1,Dial(IAX2/REC_SERVER:mysecret at my.receiving.server.ca/$
> {EXTEN}@local)
> exten => _5XXX,2,Hangup
> exten => _5XXX,102,Hangup
> 
> Any call in the mycontext context on Calling Server to extensions
> 5000-5999 (mapped by extension _5XXX) will get sent to 
> receiving server
> (my.receiving.server.ca) into the local context on the 
> receiving server.
> 
> Performing the same configuration in the opposite direction 
> will allow cross-calls between Asterisk systems.
> 
> --
> David Cook
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at 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
> 




More information about the asterisk-users mailing list