Cannot handle inbound routes

Hi,

First of all I want say this is my first approach to asterisk and FreePBX. I wanted to test them since a long time but had no the chance till these days.

The situation is I set FreePBX and asterisk with no major pain but what is driving me crazy are inbound routes. I have a single line trunk configured which is working with inbound route (DID)ANY/(CID)ANY but my plan is to add other lines (with different URIs) and IVRs so I need pbx to route calls.

I tried to use as DID voip provider URI, assigned phone number (with and without international prefix)
with no luck.
My guess is or I am using a wrong DID or I need to set a dialplan.

Before asking here I tried many days with google-fu but I surrender now.

Any hint is appreciated, if somebody wants to see a specific log I will post.

Thanks in advance

BR

cid

Hi @cid254 can you please provide us a log (from the CLI) with an inbound call ?

No need to guess. Using your working Any/Any route, all inbound calls are looged in the CDR, and the DID column shows what the provider is delivering for DID on inbound calls. You want to use that string exactly as you see it in that column.

Iā€™d be curious to hear how you are using URIs in this process.

When you set up the incoming DID in the Inbound Route, you have to match the incoming DID that gets reported in the /var/log/asterisk/full log. Search for the last seven (or so) digits of the DID and see what your provider is actually sending. Match that with your DID entry on the Inbound Route and you should be good to go.

You may also be able to use the CDR report to get the DID. I have better luck with the ā€˜fullā€™ log, but others use the CDR report with some success.

1 Like

Sure, here it is: https://pastebin.com/EZr1ssqQ

No need to guess. Using your working Any/Any route, all inbound calls are looged in the CDR, and the DID column shows what the provider is delivering for DID on inbound calls. You want to use that string exactly as you see it in that column

The point that it is empty, even if it is in use from a couple of days

As said before, I donā€™t why, CDR is empy

In log file i found:

/var/log/asterisk/full:[2020-07-07 14:09:13] VERBOSE[98712][C-0000003c] pbx.c: Executing [from-trunk@from-trunk:2] NoOp(ā€œSIP/0497966211-in-0000004eā€, ā€œReceived an unknown call with DID set to from-trunkā€) in new stack

Your provider is not including the DID in the INVITE (or possibly due to trunk misconfig), they are putting it in the To header. There is a context you can set your trunk(s) to that should extract it:

from-pstn-toheader

Thanks @lgaetz

It is working now :slight_smile:

Thanks also to everybody else which dedicated his time to solve my problem.

BR

cid

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.