New to FPBX. Cant dial out. Not sure if dial plan or trunk setup?

configuration
freepbx
Tags: #<Tag:0x00007f702b2c5400> #<Tag:0x00007f702b2c51d0>

(Nexar) #1

Hi, as title says, I can’t dial out and am unsure how to interpret the logs as I’m unsure what a successful connection should look like and where mine is going wrong. I can receive incoming calls that pass my IVR and eventually reach my reception endpoint. When I try dial the call fails, but not sure if it’s a trunk or dial plan issue.

Numbers have been altered for privacy for this post.

My trunk number is 0211234522 (as colloquially dialed). My reception number is the same with an extra 0 at the end 02112345220 (I maybe should not have gone this confusion prone route, but oh well)

Trying to dial out to 0601234503

My logs when a call is attempted:

2[2020-10-23 07:40:34] VERBOSE[2202] pbx_variables.c: Setting global variable 'SIPDOMAIN' to '192.168.0.79'
3[2020-10-23 07:40:34] VERBOSE[2202] netsock2.c: Using SIP RTP Audio TOS bits 184
4[2020-10-23 07:40:34] VERBOSE[2202] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
5[2020-10-23 07:40:34] VERBOSE[2202] netsock2.c: Using SIP RTP Audio CoS mark 5
6[2020-10-23 07:40:34] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:1] ResetCDR("PJSIP/02112345220-0000000b", "") in new stack
7[2020-10-23 07:40:34] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:2] NoCDR("PJSIP/02112345220-0000000b", "") in new stack
8[2020-10-23 07:40:34] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:3] Progress("PJSIP/02112345220-0000000b", "") in new stack
9[2020-10-23 07:40:34] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:4] Wait("PJSIP/02112345220-0000000b", "1") in new stack
10[2020-10-23 07:40:35] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:5] Playback("PJSIP/02112345220-0000000b", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack
11[2020-10-23 07:40:35] VERBOSE[21939][C-0000000a] file.c: <PJSIP/02112345220-0000000b> Playing 'silence/1.ulaw' (language 'en')
12[2020-10-23 07:40:36] VERBOSE[21939][C-0000000a] file.c: <PJSIP/02112345220-0000000b> Playing 'cannot-complete-as-dialed.ulaw' (language 'en')
13[2020-10-23 07:40:39] VERBOSE[21939][C-0000000a] file.c: <PJSIP/02112345220-0000000b> Playing 'check-number-dial-again.ulaw' (language 'en')
14[2020-10-23 07:40:41] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:6] Wait("PJSIP/02112345220-0000000b", "1") in new stack
15[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [0601234503@from-internal:7] Congestion("PJSIP/02112345220-0000000b", "20") in new stack
16[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Spawn extension (from-internal, 0601234503, 7) exited non-zero on 'PJSIP/02112345220-0000000b'
17[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [h@from-internal:1] Macro("PJSIP/02112345220-0000000b", "hangupcall") in new stack
18[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/02112345220-0000000b", "1?theend") in new stack
19[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx_builtins.c: Goto (macro-hangupcall,s,3)
20[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/02112345220-0000000b", "0?Set(CDR(recordingfile)=)") in new stack
21[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [s@macro-hangupcall:4] NoOp("PJSIP/02112345220-0000000b", " montior file= ") in new stack
22[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [s@macro-hangupcall:5] GotoIf("PJSIP/02112345220-0000000b", "1?skipagi") in new stack
23[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx_builtins.c: Goto (macro-hangupcall,s,7)
24[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Executing [s@macro-hangupcall:7] Hangup("PJSIP/02112345220-0000000b", "") in new stack
25[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'PJSIP/02112345220-0000000b' in macro 'hangupcall'
26[2020-10-23 07:40:42] VERBOSE[21939][C-0000000a] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/02112345220-0000000b'


(David) #2

The following might give you a clue:

pjsip set history on

Then place your call

pjsip set history off
pjsip show history

You can then use pjsip show history entry # to get the details… i’d be looking for the reply you got back on the trunk.


(Nexar) #3

Thank you so much for that. The output now gives me a bit more to work with.

This is what I’m getting:
freepbx*CLI> pjsip show history
No. Timestamp (Dir) Address SIP Message
===== ========== ============================== ===================================
00000 1603442453 * <== 192.168.0.100:5060 REGISTER sip:192.168.0.79 SIP/2.0
00001 1603442453 * ==> 192.168.0.100:5060 SIP/2.0 401 Unauthorized
00002 1603442454 * <== 192.168.0.100:5060 REGISTER sip:192.168.0.79 SIP/2.0
00003 1603442454 * ==> 192.168.0.100:5060 SIP/2.0 200 OK
00004 1603442454 * ==> 192.168.0.100:5060 NOTIFY sip:02112345220@192.168.0.100:5060 SIP/2.0
00005 1603442454 * <== 192.168.0.100:5060 SIP/2.0 200 OK
00006 1603442467 * ==> 135.135.135.135:5060 OPTIONS sip:0211234522@sip.isp.com;user=phone SIP/2.0
00007 1603442467 * <== 135.135.135.135:5060 SIP/2.0 200 OK
00008 1603442468 * <== 192.168.0.100:5060 INVITE sip:0601234503@192.168.0.79;user=phone SIP/2.0
00009 1603442468 * ==> 192.168.0.100:5060 SIP/2.0 401 Unauthorized
00010 1603442468 * <== 192.168.0.100:5060 ACK sip:0601234503@192.168.0.79;user=phone SIP/2.0
00011 1603442469 * <== 192.168.0.100:5060 INVITE sip:0601234503@192.168.0.79;user=phone SIP/2.0
00012 1603442469 * ==> 192.168.0.100:5060 SIP/2.0 100 Trying
00013 1603442469 * ==> 192.168.0.100:5060 SIP/2.0 183 Session Progress
00014 1603442476 * ==> 192.168.0.100:5060 SIP/2.0 503 Service Unavailable
00015 1603442476 * <== 192.168.0.100:5060 ACK sip:0601234503@192.168.0.79;user=phone SIP/2.0

I’m still a little unsure how to make sense of the log, but my understanding is:
I notice between lines 00000 and 00003 my endpoint/phone fails a registration attempt once then seems to succeed the second time.
Then line 00004 the call is requested, but around line 00009 it fails with reason Unauthorized.
I’m assuming the number in second column (1603442454) refers to the stack instance of the call? I’m unsure if the Authorization missive applies to the endpoint or to the trunk upstream?


(Lorne Gaetz) #4

You don’t have an Outbound Route dial pattern that matches 0601234503


(Nexar) #5

Thank you. Uhm, wouldn’t XXXXXXXXXX have matched? If not I clearly am missing something about how dialing plan works.

I deleted my outbound dial plan, created a new one with just one entry; 0ZXXXXXXXX. I get the same voice notice “the number you have dialed does not exist or is not in service”. My log seems different though:

No.   Timestamp  (Dir) Address                  SIP Message
===== ========== ============================== ===================================
00000 1603472862 * ==> 135.135.135.135:5060     OPTIONS sip:0211234522@sip.isp.com:5060 SIP/2.0
00001 1603472862 * <== 135.135.135.135:5060     SIP/2.0 200 OK
00002 1603472882 * ==> 192.168.0.100:5060       OPTIONS sip:02112345220@192.168.0.100:5060 SIP/2.0
00003 1603472882 * <== 192.168.0.100:5060       SIP/2.0 200 OK
00004 1603472884 * <== 192.168.0.100:5060       INVITE sip:0601234503@192.168.0.79;user=phone SIP/2.0
00005 1603472884 * ==> 192.168.0.100:5060       SIP/2.0 401 Unauthorized
00006 1603472884 * <== 192.168.0.100:5060       ACK sip:0601234503@192.168.0.79;user=phone SIP/2.0
00007 1603472884 * <== 192.168.0.100:5060       INVITE sip:0601234503@192.168.0.79;user=phone SIP/2.0
00008 1603472884 * ==> 192.168.0.100:5060       SIP/2.0 100 Trying
00009 1603472884 * ==> 135.135.135.135:5060     INVITE sip:0601234503@sip.isp.com:5060 SIP/2.0
00010 1603472884 * <== 135.135.135.135:5060     SIP/2.0 100 trying -- your call is important to us
00011 1603472884 * <== 135.135.135.135:5060     SIP/2.0 183 Session Progress
00012 1603472884 * ==> 192.168.0.100:5060       SIP/2.0 183 Session Progress
00013 1603472884 * ==> 192.168.0.100:5060       SIP/2.0 183 Session Progress
00014 1603472890 * <== 192.168.0.100:5060       CANCEL sip:0601234503@192.168.0.79;user=phone SIP/2.0
00015 1603472890 * ==> 192.168.0.100:5060       SIP/2.0 200 OK
00016 1603472890 * ==> 192.168.0.100:5060       SIP/2.0 487 Request Terminated
00017 1603472890 * ==> 135.135.135.135:5060     CANCEL sip:0601234503@sip.isp.com:5060 SIP/2.0
00018 1603472890 * <== 135.135.135.135:5060     SIP/2.0 200 canceling
00019 1603472890 * <== 135.135.135.135:5060     SIP/2.0 487 Request Terminated
00020 1603472890 * ==> 135.135.135.135:5060     ACK sip:0601234503@sip.isp.com:5060 SIP/2.0
00021 1603472890 * <== 192.168.0.100:5060       ACK sip:0601234503@192.168.0.79;user=phone SIP/2.0

It seems to be selecting the right trunk, correct? But then the call gets cancelled? Not sure.


(system) closed #6

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