Unable to dial out

I am a newbie. Just installed FreePBX(see version details below) and created 2 sip extensions. Both the extensions(pj_sip) work well. I was able to dial and receive between the two extensions without any problem.

I have a sip provider who has given me only the ip address. I created a PJSIP trunk and added the information that I could(however, I am not 100% sure).

When I dial an outbound number, all I get is “could not complete as dialed”.
Executing [[email protected]:5] Playback(“PJSIP/1002-0000000b”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
…(I had to replace the original number dialed with an “x”)

Any help is really appreciated.

My Configuration:
FreePBX 14.0.3.6
Asterisk 13.19.1

You don’t have an Outbound Route with a pattern that matches your dialed digits.

https://wiki.freepbx.org/display/FPG/Outbound+Routes+Module

I get this error when I dial out:

[2018-06-25 13:21:46] ERROR[31643]: res_pjsip.c:3114 ast_sip_create_dialog_uac: Endpoint 'PJSIP1': Could not create dialog to invalid URI 'PJSIP1'.  Is endpoint registered and reachable?
[2018-06-25 13:21:46] ERROR[31643]: chan_pjsip.c:2226 request: Failed to create outgoing session to endpoint 'PJSIP1'
[2018-06-25 13:21:46] WARNING[18558][C-0000000e]: app_dial.c:2525 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)

I have created an outbound route with NXXNXXXXXX should allow the number dialed.

Send us your “Trunk” configuration for your connection to the iTSP. Change the IP addesses to something generic (but tell us which is which).

I’ve never had good results with IP-Authentication on PJ-SIP, but it might be possible to do that. You may need to turn Chan-SIP on for this connection.

So, you need an outbound route that matches all outbound numbers. This needs to route to your trunk, which in turn needs to know how to get to your ITSP. The more information you can provide on those two configuration items, the easier it will be for us to help you.

I used this:

[SIPIN]
context=from-trunk-sip-SIPOUT

[SIPOUT]
host=x.x.x.x
type=peer
context=from-trunk

other details:
[PJSIP1]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,gsm,g726,g722
aors=PJSIP1
language=en
outbound_auth=PJSIP1
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rewrite_contact=yes
rtp_symmetric=yes
dtmf_mode=auto

and other info…

[PJSIP1]
type=registration
transport=0.0.0.0-udp
outbound_auth=PJSIP1
retry_interval=60
max_retries=10
expiration=3600
line=yes
endpoint=PJSIP1
auth_rejection_permanent=yes
server_uri=sip:x.x.x.x
client_uri=sip:[email protected]

does that help?

When you redact information, it’s important that you preserve the format. If you want to keep seven digits secret, please replace them with exactly seven X’s – if you use 6 or 8, it will mislead the people who are trying to help you.

Assuming that’s what you did, it appears that you dialed 11 digits (the first of which was 9) but your route is set to accept 10 digits, so it won’t match.

In the days of electromechanical switches, it was common (in North America) to dial 9 for an ‘outside line’ before dialing an external number. It’s not needed in modern systems and for many reasons it is undesirable. However, if you are replacing or augmenting a legacy system, you may still want to emulate that behavior.

Also, note that many trunking providers require an initial 1 before North America numbers. So, if you permit dialing e.g. 800 437 7950 (in addition to 1 800 437 7950), your Outbound Route should accept the former but prefix the initial 1. Something like:

If you still have trouble, post a more complete log (including a SIP trace if you get as far the “all circuits are busy now” announcement).

At the Asterisk command prompt, type:
pjsip show registrations
and report whether registered ok.

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