Re: [asterisk-users] Hairping calls and Originating CLI

2006-11-23 Thread Tim Panton


On 22 Nov 2006, at 14:18, Adrian Marsh wrote:




[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??


Your asterisk asks the two end points if they can/will talk to each  
other,

if they both can, it synchronizes them, then steps out of the path.



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.



I don't know about a law, but the downstream interconnecting points
probably make them sign contracts to that effect.
Of course if you can prove to Gradwell (or whoever) that the number is
yours, then it isn't spoofing - even if the call didn't really  
originate on that

line.

T.

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


Re: [asterisk-users] Hairping calls and Originating CLI

2006-11-23 Thread Steve Kennedy
On Thu, Nov 23, 2006 at 08:55:41PM +, Tim Panton wrote:

 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.
 I don't know about a law, but the downstream interconnecting points
 probably make them sign contracts to that effect.
 Of course if you can prove to Gradwell (or whoever) that the number is
 yours, then it isn't spoofing - even if the call didn't really  
 originate on that
 line.

You can set your CLI to whatever number is within your number range.
Several providers allow you to set it to whatever you like, but they
generally have an agreement (that you sign up to) that says you'll only
set it to numbers you own (or are within a number range allocated to
you). Just because you can set your number to something, doesn't mean
you're allowed to.

This became very apparent when telcos used trombing to get cheap UK
termination but you had to set your origination number to your real
number, and then the trombing operator would be charged the UK
termination rate, not the blended rate (which is an ITU regulation).


Steve

-- 
NetTek Ltd  UK mob +44-(0)7775 755503
UK +44-(0)20 79932612 / US +1-(310)8577715 / Fax +44-(0)20 7483 2455
Skype/GoogleTalk/AIM/Gizmo/Mac stevekennedyuk / MSN [EMAIL PROTECTED]
Euro Tech News Blog http://eurotechnews.blogspot.com
___
--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


RE: [asterisk-users] Hairping calls and Originating CLI

2006-11-22 Thread Adrian Marsh
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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/204SIP/ 
 404IAX2/20004:[EMAIL PROTECTED]/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:[EMAIL PROTECTED]/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|x25) in new stack

 -- Executing Set(IAX2/127.111.200.135:4569-4, CALLERID 
 (number)=404) in new stack

 -- Executing Dial(IAX2/127.111.200.135:4569-4, IAX2/ 
 iaxout:[EMAIL PROTECTED]/x25|30|r) in new stack



 ubiphone*CLI

 -- Called iaxout:[EMAIL PROTECTED]/x25



 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 [EMAIL PROTECTED]  
 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