Help converting SIP trunk to PJSIP

Hello everyone!
Sorry in advance for bad English and almost no knowledge in asterisk.

I have a really old FreePBX server that uses a SIP trunk to our provider.
I’m trying to migrate to a new server and use PJSIP (since SIP is legacy now)

Everything is working except for inbound calls - there are literally no logs when I’m trying to call to our number, and our provider answers that “All circuits are busy, please call later”.

My old config looks like this:

I tried outbound/inbound/both/none authentication and all of them works the same - no inbound calls, but outbound is working.

When I enabled and setup SIP trunk with the config above on the new server - it worked (I also natted 5060 inbound to 5160 on new server to check legacy SIP), so the problem is definitely somewhere in trunk settings.

Please help me figure out what I’m doing wrong because it’s driving me crazy and our provider is not willing to help at all :frowning:

Can you show us your PJSIP settings in which you say you have outbound calls and not incoming please? As what we are seeing is a SIP Trunk.

Yeah, no problem, it’s just there is basically nothing.

Trunk name and CID is also YYYY (our number), everything in advanced are default.

So to understand you are saying that you have no incoming calls on sip registration?

You haven’t really set up a PJSIP trunk?


pjsip show registrations

sip show peers

what do you have there?

Yes, there is no incoming calls on registration.

pjsip show registrations
YYYY/sip:x.x.x.x YYYY Registered (exp. 791s)

sip show peers - shows nothing

pjsip show endpoints - there is a bunch of extensions and this trunk:
Endpoint: YYYY Not in use 0 of inf
Aor: YYYY 0
Contact: YYYY/sip:[email protected] 44f6179949 Avail 3.016
Transport: udp 3 96
Identify: YYYY/YYYY
Match: x.x.x.x/32

change context to from-trunk, on advanced tab contact user and from user add YYYY and post your inbound route.

Also make sure you have your correct codecs. Add alaw and g722 to start with

This is an example of a working PJSIP trunk.
Depends on your provider for different settings.

Never mind, I got an email from our provider stating that they “changed something” and now it works as is :expressionless:

Thanks for the help, I can finally rest after 12 hours of listening to “all circuits are busy”

:grinning: Glad to hear you solved it!
Have a nice day without busy circuits!

1 Like

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