Inbound routing to Freepbx17 from Dinstar UC100 fxo gateway

Hello everyone,

I am new to freePBX and I am able to make local calls with our extensions. Recently I have received an dinstar uc100 1g1s1o fxo gateway from another company and would like to incorporate it to our system to enable our local extensions to use our analog pstn trunkline. Both on the same network. I am successfully able to make outbound calls from sip trunk to fxo gateway but incoming from fxo to sip trunk, I am getting 401 unauthorized, failed to authenticate as seen in the screenshots below.

PJSIP Logger

I’ve also posted my settings if it helps.

Freepbx PJSIP Settings (trunk)

Freepbx Inbound Route

Dinstar UC100 SIP Trunk status

image

Dinstar UC100 CDR List

image

Dinstar UC100 FXO Trunk Settings

Dinstar UC100 Route

I hope someone with experience or same device can help me resolve this issue.

Thank you all.

The Dinstar says it sent the INVITE from port 5060, but the PBX received it from port 50248.

Also, the addresses seem to be on different networks, because in the From header, there are only eight characters between the @ and the ., but ten characters in the Via for the first part of the address. Please explain.

This is TCP, a reliable transport, so what it is doing is valid. The 5060 is the port number to use if the UAS needs to re-establish the connection. If it sent the actual port number, it would have to be prepared to accept a response on that port number as a new connection, not just whilst the original connection is up. See last two paragraphs on page 143 of the RFC.

It does seem that Asterisk is failing to recognize the UAC, and the redaction isn’t helping one to see why, nor is the removal of the message that presumably contains the wrong identity (the log doesn’t start at the start of the call).

Sorry, my mistake. However, that doesn’t explain the address mismatch, which I suspect is related to the PBX not recognizing the call as from the Dinstar.

Hello Stewart and david,

Thank you for the response. Sorry for the late reply, this is the only time I was able to sit down on this project again. I switched transport back to UDP (the box I received was defaulted to TCP.)

After trying to make a call analog-pstn→fxo→sip trunk - running sngrep this is what it looks like:

image

I am experimenting this on a local network with analog pstn connected to the fxo gateway. I only use one trunk which successfully makes outbound calls to the fxo gateway device.

FXO extension is 8001 and it autodials to 22222 which is supposed to be the DID for the inbound route in freepbx. I’ve also tried the following:

*allowing anonymous and sip guests.

*added the voip gateway ip to whitelist.

*changed contexts to from-internal and from-trunk.

But still it is being rejected.

Thank you in advanced.