[asterisk-users] Redirect problems using IAX2 and SIP
hugolivude
hugolivude at gmail.com
Sat Nov 4 16:49:16 MST 2006
Asterisk 1.2.7
RedHat 9.0
I frequently have the need to redirect calls that come in on a DiD
provisioned by my ITSP, back to the ITSP so that they can terminate
the call on the PSTN. For example when an external call comes in, I
often have to send it to a cell phone. I believe that this is
referred to as "hairpinning" the call.
I do this by answering the incoming call and then I use a simple
"dial" command to send it back to my ISTP using a SIP or IAX channel
and the ITSP terminates it on the cell phone. One of my main goals
is to keep my Asterisk box out of the media path and let the ITSP
handle all the provisioning for the call. I understand that the
default behaviour of the "dial" command is supposed to do just that,
but I've run into problems though on both SIP & IAX channels.
With IAX I use a simple dial command:
Dial(IAX2/myIAX/7775551234)
Things seem to work great, I can see the handshaking in the CLI as the
call gets redirected and once both end points are connected, I can
actually disconnect my box from the ethernet and the call is
uninterruoted. Unfortuanately the call quality is terrible! Low
volume, choppy and so on.
It seemed to me that since I had stepped my * box out of the network,
the problem must be with the ITSP. They suggested I try SIP.
With SIP I use:
Dial(SIP/7775551234 at mySIP)
Unfortuantely I don't get the handshakes and the whole call ends up
passing through my box, which is something I'm desperate to avoid. I
have canreinvite=yes as seen from my sip.conf:
[mySIP]
type=peer
auth=md5
username=<UID>
fromuser=<UID>
fromdomain=<domain>
secret=<pw>
host=<domain>
port=5060
nat=yes
canreinvite=yes
qualify=no
disallow=all
allow=g729
dtmfmode=rfc2833
insecure=very
context=incoming-sip
Now the questions:
1) Given that I can see the handshaking and I can disconnect my * box
during the call, I think that the IAX call quality problems are on my
ITSP's end, but I could be wrong. Is there anything I can do to
improve call quality when using IAX this way?
2) What about SIP? Why doesn't that work? I always thought that
"dial" would do exactly what I'm after (hairpin/redirect the call) if
I avoided options like t or T.
Any direction you can provide is highly appreciated.
Thanks,
H
More information about the asterisk-users
mailing list