Inbound DID Routing Issue V 2.10-452a

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Inbound DID Routing Issue V 2.10-452a

Postby ajax1515 » Wed Sep 23, 2015 3:00 pm

Vicidial:
VERSION: 2.10-452a
BUILD: 141111-0554
Asterisk:
VERSION: 1.8.32.3-vici

So I followed the manual to set up an inbound campaign, however I can't get any calls to route to the IN-GROUP,

My carrier is flowroute and here's the dial-plan:
Global: TRUNK9=SIP/flowroute

exten =>_1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten =>_1NXXNXXXXXX,2,Dial(${TRUNK9}/(tech-prefix)*${EXTEN:1}@flowroute,,tTor)
exten =>_1NXXNXXXXXX,3,Hangup


The DID Flowroute has given me... we'll say is 17165551234

When I call the number, here's what the asterisk CLI outputs (I've placed the areas where I've replaced personal information in between < and >):

Code: Select all
 
1  == Using SIP RTP CoS mark 5
2   -- Executing [17165551234@default:1] AGI("SIP/flowroute-00000008", "agi://127.0.0.1:4577/call_log") in new stack
3    -- <SIP/flowroute-00000008>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
4    -- Executing [17165551234@default:2] Dial("SIP/flowroute-00000008", "SIP/flowroute/<tech-prefix>*7165551234@flowroute,,tTor") in new stack
5  == Using SIP RTP CoS mark 5
6    -- Called SIP/flowroute/<tech-prefix>*7165551234@flowroute
7    -- Got SIP response 416 "Unsupported URI Scheme in Request URI" back from <flowrouteIP>
8  == Everyone is busy/congested at this time (1:0/0/1)
9    -- Executing [17165551234@default:3] Hangup("SIP/flowroute-00000008", "") in new stack
10  == Spawn extension (default, 17165551234, 3) exited non-zero on 'SIP/flowroute-00000008'
11    -- Executing [h@default:1] AGI("SIP/flowroute-00000008", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----127-----CHANUNAVAIL----------") in new stack
12    -- <SIP/flowroute-00000008>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----127-----CHANUNAVAIL---------- completed, returning 0


It looks like it's saying there are no agents available on line 8 (even though there are) but I think that's a red herring and the real issue is happening on lines 4 and 6 which is causing the 416 response on line 7

Flowroute requires the handshake be in E.164 format with the 1 prefixed to the Dial call and in lines 4 and 6 it is clearly not. Now I've tried editing my dial plan
like this: exten =>_1NXXNXXXXXX,2,Dial(${TRUNK9}/(tech-prefix)*${EXTEN}@flowroute,,tTor)
and this: exten =>_1NXXNXXXXXX,2,Dial(${TRUNK9}/(tech-prefix)*1${EXTEN:1}@flowroute,,tTor)

to no avail....

Please help :cry:

P.S. Dial plan works beautifully for outbound

EDIT: I'm now thinking the issue is that the DID is trying to use the default context instead of trunkinbound but I have no idea why that would be.
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Inbound DID Routing Issue V 2.10-452a

Postby williamconley » Wed Sep 23, 2015 8:40 pm

Dialplan Entry is IN NO WAY used for inbound calls.

Inbound calls are routed via the "Account Entry" setting named "context".

Code: Select all
[carriercontext]
...
context=trunkinbound
...

That's it. This will cause the call for this carrier to pass to the Vicidial perl scripting service. If you want some more depth, check the [trunkinbound] context in your extensions.conf file.

Three stages:

1) The call must arrive at the Vicidial server. This can be handled via a web interface with your carrier or through registration in the carrier configuration or perhaps to an email to your salesman. Slightly different for every carrier. But nothing will work until this has been accomplished. If you're not sure if the call is arriving, turn on "sip debug" and watch the asterisk CLI during an inbound call. If there's no activity, the call is not reaching the server and you can NOT progress to stage two.

2) The call must authenticate to a sip account. Although there is a "default" context to send non-matching calls, the goal is to authenticate the inbound call through matching an IP or domain in the "Account Settings" of a carrier configuration in Vicidial under Admin->Carriers. This is handled in the account settings field in the [carriercontext] using the "host=" value.

Code: Select all
[carriercontext]
...
host=xxx.xxx.xxx.xxx (IP or domain of sending carrier)
...


Either an IP or domain name matching the IP of the server sending you the call is normally needed to "link" this inbound call to a Vicidial Admin->Carrier account.

3) The Carrier Account must then have the "context=trunkinbound" (as shown above) entry which will route the call to Vicidial.

And you're done.

Happy Hunting! 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Inbound DID Routing Issue V 2.10-452a

Postby kkreddy7 » Thu Sep 24, 2015 1:43 am

hi Guys,

I am new to Vicidail. we have installed newly and unable to receive the incoming calls. Anyone could you please help.


regards,
Krishna
mobile No 919060140918
kkreddy7
 
Posts: 1
Joined: Wed Sep 23, 2015 2:41 am

Re: Inbound DID Routing Issue V 2.10-452a

Postby ajax1515 » Thu Sep 24, 2015 9:25 am

Thank you williamconley,

I totally understand what you're saying and you've put me on the right path here.

EDIT: I don't think the host name is the problem. I've tried a few different ones. Including sip.flowroute which is the one the Carrier recommends.

>sip show peers
Name/username Host Dyn Forcerport ACL Port Status
201/201 192.168.1.25 D N 5060 OK (11 ms)
flowroute/<tech-prefix> 216.115.69.144 D N 5060 OK (101 ms)

So after some tweaking, here's the account entry:

[flowroute]
type=friend
secret=REDACTED
username=<tech-prefix>
host=sip.flowroute
dtmfmode=rfc2833
context=trunkinbound
canreinvite=no
allow=g729
insecure=port,invite
nat=yes

CLI output when an inbound call comes in:

[Sep 24 09:59:40] NOTICE[797]: chan_sip.c:23712 handle_request_invite: Call from '<tech-prefix>' (216.115.69.144:5060) to extension '17165551234' rejected because extension not found in context 'default'.

As you can see it's still trying to route to 'default' context. which is a problem.

I've tried using as hostnames:
- sip.flowroute, <--- flowroute recommends
- <tech-prefix>,
- 216.115.69.144

Lastly here is the SIP Debug output when an inbound call comes in:

<--- SIP read from UDP:216.115.69.144:5060 --->
INVITE sip:17165551234@<public vicidial telephony server ip>:5060 SIP/2.0
Record-Route: <sip:216.115.69.144;lr>
Max-Forwards: 66
Record-Route: <sip:216.115.69.132;lr>
To: <sip:+17165551234@fl.gg>
From: <sip:+<my cell number>@fl.gg;isup-oli=62;rn=716536>;tag=gK0469ac1f
Via: SIP/2.0/UDP 216.115.69.144;branch=z9hG4bK11d3.ee8abc19211278e21a87f81ba174fd96.0
Via: SIP/2.0/UDP 216.115.69.131;branch=z9hG4bK11d3.231e055836dead7320b7f448296c01a2.1
Via: SIP/2.0/UDP 216.115.69.132;branch=z9hG4bK11d3.50a51f7ec99a83f344fc03e977c45cf2.0
Via: SIP/2.0/UDP 216.221.154.11:5060;branch=z9hG4bK04B28c26b85be26853c
Call-ID: 973374817_77964601@216.221.154.11
CSeq: 16515 INVITE
Contact: <sip:+<my cell number>@216.221.154.11:5060>
Session-Expires: 1800
Min-SE: 90
Content-Length: 220
Content-Type: application/sdp
P-Asserted-Identity: <sip:+<my cell number>@fl.gg>

v=0
o=- 13122 12563 IN IP4 216.221.154.12
s=-
c=IN IP4 216.221.154.12
t=0 0
m=audio 5388 RTP/AVP 0 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
<------------->
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Inbound DID Routing Issue V 2.10-452a

Postby ajax1515 » Thu Sep 24, 2015 1:05 pm

Solved my issue!

So the problem was in my Carrier settings. I had a template ID of SIP_GENERIC selected so what was happening was the crons that rebuild sip-vicidial.conf were doing this:

[flowroute]
type=friend
secret=REDACTED
username=<tech-prefix>
host=sip.flowroute
dtmfmode=rfc2833
context=trunkinbound
canreinvite=no
allow=g729
insecure=port,invite
nat=yes
host:dynamic
context:default

Hope this helps someone else.
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 96 guests