Skip to main content

Inbound routes are not working on third lane multitenent

Posted by ramesh on Fri, 02/20/2009

incomming routes are not working. i have created the did's and i have selected the inbound routes. but the calles are not comming according to my did number it is landing on any did any cid.


Submitted by eeman on Fri, 02/20/2009 Permalink

you need to provide alot more information before someone can help you since there is approximately 300 different ways to deliver calls to an asterisk box

Submitted by ramesh on Fri, 02/20/2009 Permalink

i have created the inbound routes with did the call is landing on asterisk box but it is not going to th right destination in the asterisk cli i am getting an out put like this

Executing [s@from-outside:1] Wait("SIP/R354590-b7612d50", "1") in new stack

-- Executing [s@from-outside:2] Set("SIP/R354590-b7612d50", "__INCOMINGCLI=6099455925") in new stack

-- Executing [s@from-outside:3] Goto("SIP/R354590-b7612d50", "from-outside-redir|s|1") in new stack

-- Goto (from-outside-redir,s,1)

[Feb 20 13:17:30] WARNING[20368]: pbx.c:2470 __ast_pbx_run: Channel 'SIP/R354590-b7612d50' sent into invalid extension 's' in context 'from-outside-redir', but no invalid handler

Submitted by gregshap on Mon, 02/23/2009 Permalink

Make sure you have a generic route "S" and forward that to an extention, if it works to that extention, then your provider does not provide the DID header that the box is looking for. I notice that Axvoice does not provide it and some others may not either.

Submitted by Denis Campq on Thu, 02/26/2009 Permalink

My SIP provider gives the DID in the SIP TO header. There is a script that extracts the DID from the SIP TO: Header. (tl-reroute-using-to-header).

I never figured out how to inject this script but I used it to make a change to Extensions.conf as shown below. I am still a novic at scripting but it worked for me.

Take a look at the TO: header using asterisk CLI with sip set debug on and make an inbound call and look at the messages. You will need to create a DID pattern that will match what is there.

Hope this helps.

Submitted by Denis Campq on Thu, 02/26/2009 Permalink

Sorry here is the change I made to get Broadvox DID to work.

From Extensions.conf

from-outside]

exten => _X.,1,Wait(1)

exten => _X.,n,Set(__INCOMINGCLI=${CALLERID(num)})

exten => _X.,n,Goto(from-outside-redir,${EXTEN},1)

exten => _+X.,1,Wait(1)

exten => _+X.,n,Set(__INCOMINGCLI=${CALLERID(num)})

exten => _+X.,n,Goto(from-outside-redir,${EXTEN},1)

exten => s,1,Wait(1)

exten => s,n,Set(__INCOMINGCLI=${CALLERID(num)})

; Added by Denis to handle Broadvox DIDs

;exten => s,n,Goto(from-outside-redir,${EXTEN},1)

exten => s,n,Set(TO=${SIP_HEADER(TO)})

exten => s,n,Set(temp=${CUT(TO,\:,2)})

exten => s,n,Set(DID=${CUT(temp,\@,1)})

exten => s,n,Set(EXTEN=${CUT(temp,\@,1)})

exten => s,n,Goto(from-outside-redir,${DID},1)

Submitted by ramesh on Sat, 02/28/2009 Permalink

i have enabled the dns over ani with my provider and i am able to route the calls but i am loosing the original caller id number.it is showing my did number as an caller id number.

i have put this script in my extensions.conf file.

[from-outside]

exten => _X.,1,Wait(1)

exten => _X.,n,Set(__INCOMINGCLI=${CALLERID(num)})

exten => _X.,n,Goto(from-outside-redir,${EXTEN},1)

exten => _+X.,1,Wait(1)

exten => _+X.,n,Set(__INCOMINGCLI=${CALLERID(num)})

exten => _+X.,n,Goto(from-outside-redir,${EXTEN},1)

exten => s,1,Wait(1)

exten => s,n,Set(__INCOMINGCLI=${CALLERID(num)})

;exten => s,n,Goto(from-outside-redir,${EXTEN},1)

exten => s,n,Set(TO=${SIP_HEADER(CONTACT)})

exten => s,n,Set(temp=${CUT(TO,\:,2)})

exten => s,n,Set(DID=${CUT(temp,\@,1)})

exten => s,n,Set(EXTEN=${CUT(temp,\@,1)})

exten => s,n,Goto(from-outside-redir,${DID},1)

Submitted by ramesh on Sat, 02/28/2009 Permalink

Here is my sip trace . This script is not working in my case.

[from-outside]

exten => _X.,1,Wait(1)

exten => _X.,n,Set(__INCOMINGCLI=${CALLERID(num)})

exten => _X.,n,Goto(from-outside-redir,${EXTEN},1)

exten => _+X.,1,Wait(1)

exten => _+X.,n,Set(__INCOMINGCLI=${CALLERID(num)})

exten => _+X.,n,Goto(from-outside-redir,${EXTEN},1)

exten => s,1,Wait(1)

exten => s,n,Set(__INCOMINGCLI=${CALLERID(num)})

;exten => s,n,Goto(from-outside-redir,${EXTEN},1)

exten => s,n,Set(TO=${SIP_HEADER(CONTACT)})

exten => s,n,Set(temp=${CUT(TO,\:,2)})

exten => s,n,Set(DID=${CUT(temp,\@,1)})

exten => s,n,Set(EXTEN=${CUT(temp,\@,1)})

exten => s,n,Goto(from-outside-redir,${DID},1)

U 216.143.130.36:5060 -> 192.168.0.165:5060

INVITE sip:s@173.15.160.89:5060 SIP/2.0..Record-Route: ..Via: SIP/2.0/UDP 216.

143.130.36;branch=z9hG4bK32db.7ef120d5.0..Via: SIP/2.0/UDP 216.143.130.48:5060;branch=z9hG4bK5345f518;rport=5060..From:

"INFORMATION DAT " ;tag=as4975ac37..To: ..Contact: ..Call-ID: 7018d7ec231364cc317f049d7fad896d@216.143.130.48..CSeq: 102 INVITE..User-Agent: Asterisk P

BX..Max-Forwards: 69..Date: Sat, 28 Feb 2009 22:41:45 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, N

OTIFY..Supported: replaces..Content-Type: application/sdp..Content-Length: 367....v=0..o=root 11645 11645 IN IP4 216.143

.130.48..s=session..c=IN IP4 216.143.130.48..b=CT:384..t=0 0..m=audio 13964 RTP/AVP 0 8 101..a=rtpmap:0 PCMU/8000..a=rtp

map:8 PCMA/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a=sendrecv..

m=video 25060 RTP/AVP 31 34..a=rtpmap:31 H261/90000..a=rtpmap:34 H263/90000..a=sendrecv..

#

U 192.168.0.165:5060 -> 216.143.130.36:5060

SIP/2.0 100 Trying..Via: SIP/2.0/UDP 216.143.130.36;branch=z9hG4bK32db.7ef120d5.0;received=216.143.130.36..Via: SIP/2.0/

UDP 216.143.130.48:5060;branch=z9hG4bK5345f518;rport=5060..Record-Route: ..Fro

m: "INFORMATION DAT " ;tag=as4975ac37..To: ..Call-ID: 7018d7ec

231364cc317f049d7fad896d@216.143.130.48..CSeq: 102 INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS

, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact: ..Content-Length: 0....

############################################################################################

U 192.168.0.165:5060 -> 216.143.130.36:5060

SIP/2.0 603 Declined..Via: SIP/2.0/UDP 216.143.130.36;branch=z9hG4bK32db.7ef120d5.0;received=216.143.130.36..Via: SIP/2.

0/UDP 216.143.130.48:5060;branch=z9hG4bK5345f518;rport=5060..From: "INFORMATION DAT " ;ta

g=as4975ac37..To: ;tag=as0da695ef..Call-ID: 7018d7ec231364cc317f049d7fad896d@216.143.130.48..

CSeq: 102 INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supporte

d: replaces..Contact: ..Content-Length: 0....

#

U 216.143.130.36:5060 -> 192.168.0.165:5060

ACK sip:s@173.15.160.89:5060 SIP/2.0..Via: SIP/2.0/UDP 216.143.130.36;branch=z9hG4bK32db.7ef120d5.0..From: "INFORMATION

DAT " ;tag=as4975ac37..Call-ID: 7018d7ec231364cc317f049d7fad896d@216.143.130.48..To: ;tag=as0da695ef..CSeq: 102 ACK..Max-Forwards: 70..User-Agent: OpenSER (1.3.0-notls (i386/freebsd)

)..Content-Length: 0....

could you please help me out...............

Submitted by eeman on Sat, 02/28/2009 Permalink

the trace you sent us looks like it was initiated by another asterisk box, so your code isn't going to help you. It would be a LOT more helpful if you didn't come into the forums and refuse to give much much much more verbose explanations of the scenario. If you would begin with a full, detailed, VERY DETAILED, explanation of what you did, and how to interpret your captures; you'd get better help. Which machine is 173.15.160.89 and who is 216.143.130.48? did you set this remote trunk up? Or someone else?

INVITE sip:s@173.15.160.89:5060 SIP/2.0..Record-Route: ..Via: SIP/2.0/UDP 216.143.130.36;branch=z9hG4bK32db.7ef120d5.0..Via: SIP/2.0/UDP 216.143.130.48:5060;branch=z9hG4bK5345f518;rport=5060..From:"INFORMATION DAT " ;tag=as4975ac37..To: ..Contact: ..Call-ID: 7018d7ec231364cc317f049d7fad896d@216.143.130.48..CSeq: 102 INVITE..User-Agent: Asterisk PBX..Max-Forwards: 69..Date: Sat, 28 Feb 2009 22:41:45 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Content-Type: application/sdp..Content-Length: 367....v=0..o=root 11645 11645 IN IP4 216.143.130.48..s=session..c=IN IP4 216.143.130.48..b=CT:384..t=0 0..m=audio 13964 RTP/AVP 0 8 101..a=rtpmap:0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a=sendrecv..m=video 25060 RTP/AVP 31 34..a=rtpmap:31 H261/90000..a=rtpmap:34 H263/90000..a=sendrecv..

it looks like the asterisk box on the other end is dialing like

Dial(SIP/trunkname)

instead of

Dial(SIP/trunkname/numbertodial)

no script will help you from a poorly setup remote.