[asterisk-users] Hairpinning problems using IAX2 and SIP

Andrew Joakimsen joakimsen at gmail.com
Sat Nov 4 21:32:22 MST 2006


When you say you answer the call, I assume you have something like this:

exten => 5551212,1,Answer
exten => 5551212,1,Dial(SIP/provider/10005551212)

Try to not answer the call and see if the behviour changes, it could just be
your ITSP configuration....

On 11/4/06, hugolivude <hugolivude at gmail.com> wrote:
>
> 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
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061104/502d8309/attachment.htm


More information about the asterisk-users mailing list