[asterisk-users] Hairpinning problems using IAX2 and SIP

Andrew Joakimsen joakimsen at gmail.com
Mon Nov 6 11:14:01 MST 2006


Why don't you try 1.12.13? Besides fixing some security issues, it should
work, I doing a SMB install this weekend (so no concern of billing/CDR
really) so we didn't use notransfer=yes and it worked perfectly, even behind
NAT.

Also you should contact your ITSP, maybe they don't allow this?

On 11/5/06, hugolivude <hugolivude at gmail.com> wrote:
>
> Thanks for responding.
>
> Yes I am doing pretty much exactly what you showed.  When I try to
> dial without answering, I get a busy tone on the DiD (the local Telco
> offers to let them notify me when it becomes available).  Sometimes I
> get half a ring on the destination cell phone b4 receiving the busy
> signal.
>
> Not sure whether this sheds any light.  I'm going to have to answer
> the call anyway in order to implement an auto attendant, but it was
> worth trying.
>
> Cheers,
> H
>
>
> *CLI>     -- Accepting AUTHENTICATED call from <ip>:
>        > requested format = ulaw,
>        > requested prefs = (),
>        > actual format = g729,
>        > host prefs = (g729),
>        > priority = mine
>     -- Executing Dial("IAX2/<ITSP>-1", "IAX2/<ITSP>/6135551234") in new
> stack
>     -- Called <ITSP>/6135551234
>     -- Call accepted by <ip> (format g729)
>     -- Format for call is g729
>     -- IAX2/<ITSP>-2 is making progress passing it to IAX2/<ITSP>-1
>     -- Hungup 'IAX2/<ITSP>-2'
>   == Spawn extension (incoming-iax, 6135551234", 1) exited non-zero on
> 'IAX2/<ITSP>1'
>     -- Executing Hangup("IAX2/<ITSP>-1", "") in new stack
>   == Spawn extension (incoming-iax, h, 1) exited non-zero on
> 'IAX2/<ITSP>-1'
>     -- Hungup 'IAX2/<ITSP>-1'
>
>
>
> On 11/4/06, Andrew Joakimsen <joakimsen at gmail.com> wrote:
> > 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
> > >
> >
> >
> > _______________________________________________
> > --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
> >
> >
> >
> _______________________________________________
> --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/20061106/f6ecfed3/attachment.htm


More information about the asterisk-users mailing list