[asterisk-users] IAX vs SIP trunks between Asterisk boxes

Brad Templeton brad+aster at templetons.com
Sat Jan 6 23:47:53 MST 2007


On Fri, Jan 05, 2007 at 11:33:02AM +0000, Gordon Henderson wrote:
> On Thu, 4 Jan 2007, Noah Miller wrote:
> 
> >Hi Damon -
> >
> >>Can anyone comment on the overhead added when a SIP call comes into one
> >>asterisk box, is routed to another with IAX instead of SIP, and is then 
> >>sent
> >>to the UA from the second box with SIP?
> >>
> >>DTMF passthrough issues?
> >
> >I've got a client with sip phones on several different servers and
> >IAX links between the servers, so I guess that's pretty similar to
> >your setup.  I've never bothered to check for overhead since it was
> >never an issue (all servers are P4 2.8 ghz or Xeon 2.8 ghz, 1GB ram,
> >with never more than 3-4 calls going through any one of the IAX
> >links).  I can say that DTMF works fine in this setup.
> 
> I'm doing the same on 1GHz processors - CPU usage is virtually nil unless 
> there's transcoding going on (about 4% per GSM transcode)
> 
> ADSL bandwidth is more of a concern for me in these applications )-:


While it would be work to set up, you actually ideally want to
trunk with the same protocol being used by the external phones
or endpoints.   When connecting a SIP to SIP call (presuming you
don't have annoying nat problems or have turned canreinvite off)
the audio should go directly from endpoint to endpoint and not
via asterisk.    Ditto on IAX to IAX calls.   

For SIP phone calling * box, relay to other * box and out to SIP
phone, you definitely want SIP all the way.

In some ways, an ideal solution would have two "trunk" connections
between the boxes (really just two config entries in iax.conf and
sip.conf) and go between the boxes with whatever protocol the
calling channel is using.  You could write dialplan scripts to 
pull out the channel and choose the right * to * protocol (as
opposed to inter-asterisk protocol which has another meaning.
:-)

It can also be worth having a termination provider that you
can talk to with both IAX and SIP, and sending them the call
with the same protocol the phone used.

Annoyingly, IAX and SIP channels use different interfaces
to provide the address, so you can't do
    DIAL(${chantype}/phonenum at provider)

A cute patch would be to support that with a consistent syntax over
channels.


Note if you use various flags on Dial which require asterisk
to hear dtmf or do other audio, you are stuck hairpinning.


More information about the asterisk-users mailing list