Extension dials externa number but inbound route is not working

FreePBX v14.0.1.20

  • I configured a pjsip extension to direct calls to a mobile phone. Using a soft phone, when I dial extension 201 the mobile phone rings.

  • The command “sip show registry” indicates a “Registered” state.

So I created an Inbound Route and “Set Destination” to extension 201. But when I dial the sip number, it rings once and then hangs up.

Any idea on what could I be doing wrong?

My guess: The foreign Caller ID is causing the ITSP to hang up the call.

any suggestion on what can I do to fix this?

Not without a lot more details. For example - is that the problem?

If it is, update the trunk settings to always send your caller ID. Yes, I understand that will drop the caller ID from the original call, but it’s worth a try. See of that solves the problem.

If it turns out to be your issue, you’ll need to find an Outbound Route vendor that supports foreign caller IDs (I use Alcazar Networks for this) and send the call out through this new trunk.

Keep in mind that there are LOTS of things that can cause this - with the “one ring and hang up” symptom, my guess is good, but by no means definitive.

This command cannot and will not show the state of a PJSIP extension/endpoint. The sip commands in the Asterisk console are for Chan_SIP, the PJSIP commands are pjsip show <command> or pjsip <command>

Does the inbound call get answered if it hits an IVR or an Announcement or anything directly on the PBX?

Yes, I just sent the inbound call to a recording, and it works, I can hear it.

Are the phones on the same local network as the PBX or are they remote and have to connect over the Internet?

they are on the same lan.

i think I know what the problem is. I was using a sip trunk, not a pjsip trunk.
Now the call reaches the mobile phone, but when I answer it, there’s no audio.

OK, go into Settings --> Asterisk SIP Settings

  1. Make sure your NAT settings are correct
  2. Make sure the External IP (WAN) is correct/set
  3. Make sure your Local Network is correct/set.

Is it possible Asterisk is not setting the external IP in the media session body or in other parts of the SIP message. This can cause audio issues. Also make sure your router’s NAT/Firewall isn’t interfering and dropping/routing the reply packets wrong.

Generally though complete audio loss on an “outbound” call means the media IPs are not correct.

I checked the network settings and they are ok. So I created a queue and forwarded that to the external number. Audio is OK now! But when using an extension, I have no audio.