[asterisk-users] Hairping calls and Originating CLI

Adrian Marsh Adrian.Marsh at ubiquisys.com
Wed Nov 22 07:18:33 MST 2006


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tim Panton
Sent: 21 November 2006 19:16
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Hairping calls and Originating CLI


On 21 Nov 2006, at 10:08, Adrian Marsh wrote:

> Hi,
>
>
>
> I'm trying to track down what happened to some calls to a mobile  
> today between 9:00 and 9:15
>
>
>
> (I've modified the log to mask IPs/Passwds/Phone #, etc.    
> 127.111.200.*  is our PSTN provider - Gradwell, the extension is  
> configured to ring 3 SIP connections, then divert to a mobile).
>
>
>
> Below is our IAX log from our Asterisk box.  The log has raised 2  
> questions.  heres the call-flow as I understand it:
>
>
>
> First question:
>
>
>
> 1) A call comes in from 127.111.200.135, we try contacting various  
> SIP clients, and timeout
>
> 2) After the timeout we then place an outbound call to a mobile,  
> via 127.111.200.135, but the call is accepted by 127.111.201.75   
> (is this a cluster?)
>
>
>
> 3) The mobile is answered, and both call-legs are marked as "ready  
> to transfer"..
>
>
>
> At this point:  Who hairpins the call?  i.e., is the call handed  
> back to Gradwell ?
>
>
>
> The next message in the log is "Releasing" the two calls, rather  
> than any message about joining them, and then we see hangup messages.
>
>
>
>
>
> Second question:   In the outbound leg (our A*k -> mobile), we set  
> the CallerID number to the public PSTN of the local extension  
> here.. Is there any reason why we can't set this to be the  
> originating CLI from the first leg (the incoming call) ?
>
>
>
> Example scenario:  Bob calls Tracy, Bobs CLI gives his originating  
> number.. The A*k box makes an outbound call to Tracys mobile.   
> Theres little point in putting the second-leg originating CLI as  
> Tracy's office number (herself calling herself).  Instead, we need  
> to put Bobs CLI as the originating digits, and the join the two  
> legs of the call.
>
>
>
> I'm going to post this out to the A*k maillist, and see what comes  
> back, but I thought I'd get your view..
>
>
>
>
>
> ubiphone*CLI>
>
>     -- Accepting AUTHENTICATED call from 127.111.200.135:
>
>        > requested format = ulaw,
>
>        > requested prefs = (),
>
>        > actual format = ulaw,
>
>        > host prefs = (ulaw|alaw),
>
>        > priority = mine
>
>
>
> ubiphone*CLI>
>
>     -- Executing GotoIf("IAX2/127.111.200.135:4569-4", "0?20") in  
> new stack
>
>     -- Executing Dial("IAX2/127.111.200.135:4569-4", "SIP/204&SIP/ 
> 404&IAX2/20004:passwd at 3rdpartypbx.com/20004|15|r") in new stack
>
>     -- Called 204
>
> Nov 21 09:07:14 NOTICE[1333]: app_dial.c:1049 dial_exec_full:  
> Unable to create channel of type 'SIP' (cause 3 - No route to  
> destination)
>
>
>
> ubiphone*CLI>
>
>     -- Called 20004:passwd at 3rdpartypbx.com/20004
>
>
>
> ubiphone*CLI>
>
>     -- SIP/204-088ac6b0 is ringing
>
>
>
> ubiphone*CLI>
>
>     -- Call accepted by 194.192.14.200 (format alaw)
>
>     -- Format for call is alaw
>
>
>
> ubiphone*CLI>
>
>     -- IAX2/194.192.14.200:4569-6 is ringing
>
>
>
> ubiphone*CLI>
>
>     -- Nobody picked up in 15000 ms
>
>     -- Hungup 'IAX2/194.192.14.200:4569-6'
>
>     -- Executing Macro("IAX2/127.111.200.135:4569-4", "call-mobile| 
> 2004|xxxxxxxxx25") in new stack
>
>     -- Executing Set("IAX2/127.111.200.135:4569-4", "CALLERID 
> (number)=xxxxxxxx404") in new stack
>
>     -- Executing Dial("IAX2/127.111.200.135:4569-4", "IAX2/ 
> iaxout:ubipass at iax-out.gradwell.net/xxxxxxxxx25|30|r") in new stack
>
>
>
> ubiphone*CLI>
>
>     -- Called iaxout:ubipass at iax-out.gradwell.net/xxxxxxxxx25
>
>
>
> ubiphone*CLI>
>
>     -- Call accepted by 127.111.201.75 (format ulaw)
>
>     -- Format for call is ulaw
>
>
>
> ubiphone*CLI>
>
> Nov 21 09:07:32 ERROR[13825]: chan_sip.c:10990  
> handle_request_subscribe: Got SUBSCRIBE for extension 2005 at from-sip  
> from 192.168.1.2, but there is no hint for that extension
>
>
>
> ubiphone*CLI>
>
>     -- IAX2/127.111.201.75:4569-3 is ringing
>
>
>
> ubiphone*CLI>
>
>     -- IAX2/127.111.201.75:4569-3 is making progress passing it to  
> IAX2/127.111.200.135:4569-4
>
>
>
> ubiphone*CLI>
>
>     -- IAX2/127.111.201.75:4569-3 answered IAX2/127.111.200.135:4569-4
>
>     -- Attempting native bridge of IAX2/127.111.200.135:4569-4 and  
> IAX2/127.111.201.75:4569-3
>
>
>
> ubiphone*CLI>
>
>     -- Channel 'IAX2/127.111.200.135:4569-4' ready to transfer
>
>
>
> ubiphone*CLI>
>
>     -- Channel 'IAX2/127.111.201.75:4569-3' ready to transfer
>
>     -- Releasing IAX2/127.111.201.75:4569-3 and  
> IAX2/127.111.200.135:4569-4
>
>
>
> ubiphone*CLI>
>
>     -- Hungup 'IAX2/127.111.201.75:4569-3'
>
>   == Spawn extension (macro-call-mobile, s, 2) exited non-zero on  
> 'IAX2/127.111.200.135:4569-4' in macro 'call-mobile'
>
>   == Spawn extension (macro-call-mobile, s, 2) exited non-zero on  
> 'IAX2/127.111.200.135:4569-4'
>
>     -- Hungup 'IAX2/127.111.200.135:4569-4'
>
>

To answer your questions:

 > At this point:  Who hairpins the call?  i.e., is the call handed  
back to Gradwell ?

Your asterisk box hairpins it. Unless you have notransfer=yes in  
iax.conf asterisk will
always _try_ and transfer a call where both endpoints are IAX so that  
it isn't in the
path unless it can't for one reason or another. So, yes the call is  
passed back to
Gradwell, with their IAX-in box talking to their IAX-out box (ie  
127.111.200.135 and
127.111.201.75).

 > Second question:   In the outbound leg (our A*k -> mobile), we set  
the CallerID number to the public PSTN of the local extension here..  
Is there any reason why we can't set this to be the originating CLI  
from the first leg (the incoming call) ?

Mmmm, it depends on what Gradwell is prepared to do. Many UK  
providers (and I think they are one) require
proof that you 'own' the CLID you want to present before they pass it  
on. This would be tricky in the case
of a mobile number, unless it is one that your company 'own' - i.e.  
one of your pool of corporate mobiles,
in which case they _might_ accept it.

Tim Panton

www.mexuar.net
www.westhawk.co.uk/



_______________________________________________
--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


[Adrian Marsh] 

Thanks Tim,

Notransfer is commented out (so I guess means = transfer).
How does Asterisk know that the IN and OUT IPs are the same A*k box?
(They may not be I guess).  If the IPs are different, wouldn't it need
to join the calls itself??

I've asked gradwell about my second point (still waiting...), but your
thoughts are the same as mine.  In theory it should be ok, because I
have to authenticate the IAX connection with a username/password, which
in turn they own and can look up if needed.. But I think theres
something in UK law that says you can't be allowed to spoof the
originating CLI.

Adrian




More information about the asterisk-users mailing list