Inbound Calls not working with a new gateway

Vaibhav28890

New Member
Nov 24, 2022
8
1
3
20
Hi, I'm trying to add a new gateway to my fusionPBX. I have two working gateways and everything is nice with them.

When I add this new gateway (it's from inopla), it's getting registered as expected and I can also use it to make outbound calls.

Now, the issue is that when I create a destination using the provided SIP Trunk number from them for example xxxxxxxx001 the calls are getting rejected. In the logs I can see the reason is "unallocated number", but here's the twist no matter what number I call from the SIP trun it's looking for the number that is used as the username during gateway registration.

When I create a destination using the username number of that gateway I get the calls, this way all the number from the SIP Trunk points to this username number destination.

I'm not sure why this is happening.. Any help is appreciated.
 

Attachments

  • Screenshot 2024-12-21 194033.png
    Screenshot 2024-12-21 194033.png
    67.8 KB · Views: 5

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,077
578
113
Start by using sngrep to see what the INVITE looks like that the carrier sends you and post that.
 

Vaibhav28890

New Member
Nov 24, 2022
8
1
3
20
Hi @DigitalDaz, thanks for reaching out

Here's the invite and log for the same

find the logs here, pastebin

Here's some other weird thing, the port of the calls for this gateway is random and always Rejected

Screenshot 2024-12-21 221933.png
 

Attachments

  • Screenshot 2024-12-21 222253.png
    Screenshot 2024-12-21 222253.png
    84.6 KB · Views: 6

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,077
578
113
What relevance is this to you? 0005975999

That appears to be the number it is trying to match but I see no reference to that in the invite.
 

Vaibhav28890

New Member
Nov 24, 2022
8
1
3
20
0005975999 is just the username for the gateway.

I'm using inopla and they offer an interface to route the numbers to the pbx, sadly there's one filed called destination number and the only value I can use there is 0005975999 (which corresponds to the SIP Trunk I think). I think that this is something that should be solved from their end ?

Here's a picture of the interface


new.png

They offer some plugins, if that can solve it ?

plugins.png
 

Vaibhav28890

New Member
Nov 24, 2022
8
1
3
20
Also I have tried one weird approach to handle this but I don't know if this would work.

I modified one inbound XML to look for the number 0005975999 and then somehow modify the line

<action application="transfer" data="511901223001 XML 94.237.89.207"/>

to redirect the call internally, with this maybe I can replace the number 511901223001 with some variable that contains the called destination number and since there will be an inbound destination with that number it'll transfer the call?

Even for this I need a bit of your help @DigitalDaz because the above transfer condition doesn't work for inbound destinations, it's only working if I replace the number with a call center queue or conference room and then the next step will be to extract the number from some variable and use it there!!

is that something we can do ?

Screenshot 2024-12-22 192323.png