Unable to connect with trunk

When i try to setup a twilio sip trunk following this guide, this error appears in the CLI

After a few seconds:

== Endpoint Twilio_Trunk is now Reachable
    -- Contact Twilio_Trunk/sip:[email protected]:5060 is now Reachable.  RTT: 78.752 msec

But, pjsip show registrations shows:

No objects found.

So when I try to make a outbound call I get the message “all circuits are busy now”, inbounds calls don’t even ring.

The guide to which you linked shows pjsip settings including Registration: None (they send calls directly to your public IP address), so no registrations is expected.

For outgoing, at the Asterisk command prompt, type
pjsip set logger on
make a failing test call, paste the Asterisk log for the call at pastebin.freepbx.org and post the link here.

On an incoming attempt, if anything appears in the Asterisk log, paste that. If nothing, run sngrep and report how incoming attempts appear there. If nothing there, either, describe the networking equipment (especially any router/firewall) between the internet and your PBX.

pjsip set logger on output: PJSIP log - FreePBX Pastebin
outbound call output: Outbound - FreePBX Pastebin
incoming call output: Incoming - FreePBX Pastebin

On outbound, Twilio rejected the call on line 381
SIP/2.0 400 Invalid phone number
It appears that your Outbound Route prefixed a +1 to the number, expecting the caller to send e.g. 4154758378. But the caller actually sent on line 2
INVITE sip:[email protected] SIP/2.0
which is much different. You’ll either have to fix the source to use a more reasonable format, or write some custom dial plan to fish out the destination number.

Your incoming paste shows no attempt at a call. Either you pasted the wrong range of log lines, or (more likely) the call did not reach Asterisk. Run sngrep and report what you see there. If nothing, the trouble is with your router/firewall, or the configuration on the Twilio portal.

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