Outbound Calling Issue

Hello all,

I am having an issue setting up the outbound route/trunk, calls do not leave the FreePBX v14.0.3.1

Scenario is : X-lite(107) > FreePBX > Cisco 2951 > 0911111135(mob)

Call does not reach to Cisco GW at all, it gives the following logs on the astriesk logfile :

[2018-08-07 21:37:00] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:1] ResetCDR("SIP/107-00000002", "") in new stack

[2018-08-07 21:37:00] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:2] NoCDR("SIP/107-00000002", "") in new stack

[2018-08-07 21:37:00] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:3] Progress("SIP/107-00000002", "") in new stack

[2018-08-07 21:37:00] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:4] Wait("SIP/107-00000002", "1") in new stack

[2018-08-07 21:37:01] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:5] Playback("SIP/107-00000002", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack

[2018-08-07 21:37:01] VERBOSE[26238][C-00000001] file.c: <SIP/107-00000002> Playing ‘silence/1.ulaw’ (language ‘en’)

[2018-08-07 21:37:02] VERBOSE[26238][C-00000001] file.c: <SIP/107-00000002> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)

[2018-08-07 21:37:05] VERBOSE[26238][C-00000001] file.c: <SIP/107-00000002> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)

[2018-08-07 21:37:07] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:6] Wait("SIP/107-00000002", "1") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:7] Congestion("SIP/107-00000002", "20") in new stack

[2018-08-07 21:37:08] WARNING[26238][C-00000001] channel.c: Prodding channel ‘SIP/107-00000002’ failed

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Spawn extension (from-internal, 0911111135, 7) exited non-zero on ‘SIP/107-00000002’

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:1] Macro("SIP/107-00000002", "hangupcall") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:1] GotoIf("SIP/107-00000002", "1?theend") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx_builtins.c: Goto (macro-hangupcall,s,3)

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:3] ExecIf("SIP/107-00000002", "0?Set(CDR(recordingfile)=)") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:4] NoOp("SIP/107-00000002", " monior file= ") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:5] AGI("SIP/107-00000002", "attendedtransfer-rec-restart.php,") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] res_agi.c: <SIP/107-00000002>AGI Script attendedtransfer-rec-restart.php completed, returning 0

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Executing [[email protected]:6] Hangup("SIP/107-00000002", "") in new stack

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/107-00000002’ in macro ‘hangupcall’

[2018-08-07 21:37:08] VERBOSE[26238][C-00000001] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/107-00000002’

Trunk config :
outgoing Peer details:

host=10.198.199.1
type=friend
context=from-trunk
allow=alaw,ulaw
insecure=port,invite

Incoming :

User context:from-internal

host=10.198.199.1
type=friend
allow=alaw&ulaw
insecure=port,invit

Inbound calling works just fine.

You don’t have an outbound route that matches

0911111135

http://wiki.freepbx.org/

I do have one that points to : 0XXNNNNNNN ,I also tried creating an exact match one for testing. call proceeds but does not go to the gateway at all I will share the output here once I access the server again

https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching

0XXNNNNNNN !~ 0911111135

but

0NZZZZZZNN =~ 0911111135

N =~ 2-9
Z =~ 1-9
N =~ 0-9
X =~ anything-including-alpha ; try not to use it :wink:

Thank you for your replies, I have changed the dial-pattern as suggested
calls reach to the gateway and fail due to :

SIP/2.0 400 Bad Request - ‘Malformed/Missing URL’

I think cisco does not like the current format of the invite received

this is the log from astriesk:

[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:2] ExecIf(“SIP/107-00000015”, “1?Set(CALLERID(number)=107)”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:8] Set(“SIP/107-00000015”, “CALLERID(all)=“Simplify” <107>”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:9] Set(“SIP/107-00000015”, “_KEEPCID=TRUE”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:10] Goto(“SIP/107-00000015”, “ext-trunk,1,1”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx_builtins.c: Goto (ext-trunk,1,1)
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:1] Set(“SIP/107-00000015”, “TDIAL_STRING=SIP/Cisco2951”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:2] Set(“SIP/107-00000015”, “DIAL_TRUNK=1”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:3] Goto(“SIP/107-00000015”, “ext-trunk,tdial,1”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx_builtins.c: Goto (ext-trunk,tdial,1)
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:1] Set(“SIP/107-00000015”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:2] GotoIf(“SIP/107-00000015”, “1?nomax”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx_builtins.c: Goto (ext-trunk,tdial,4)
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:4] ExecIf(“SIP/107-00000015”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:5] ExecIf(“SIP/107-00000015”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:6] Set(“SIP/107-00000015”, “DIAL_NUMBER=”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:7] GosubIf(“SIP/107-00000015”, “0?sub-flp-1,s,1()”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:8] Set(“SIP/107-00000015”, “OUTNUM=”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:9] Set(“SIP/107-00000015”, “DIAL_TRUNK_OPTIONS=T”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:10] Dial(“SIP/107-00000015”, “SIP/Cisco2951/,300,T”) in new stack
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] netsock2.c: Using SIP RTP TOS bits 184
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] netsock2.c: Using SIP RTP CoS mark 5
[2018-08-08 18:54:31] VERBOSE[11059][C-00000009] app_dial.c: Called SIP/Cisco2951/
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Spawn extension (ext-trunk, tdial, 10) exited non-zero on ‘SIP/107-00000015’
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] app_stack.c: SIP/107-00000015 Internal Gosub(crm-hangup,s,1) start
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:1] NoOp(“SIP/107-00000015”, “Sending Hangup to CRM”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:2] NoOp(“SIP/107-00000015”, “HANGUP CAUSE: 38”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/107-00000015”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:4] NoOp(“SIP/107-00000015”, “MASTER CHANNEL: 1533754471.27 = 1533754471.27”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/107-00000015”, “0?return”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:6] Set(“SIP/107-00000015”, “__CRM_HANGUP=1”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:7] AGI(“SIP/107-00000015”, “sangomacrm.agi”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] res_agi.c: <SIP/107-00000015>AGI Script sangomacrm.agi completed, returning 0
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] pbx.c: Executing [[email protected]:8] Return(“SIP/107-00000015”, “”) in new stack
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] app_stack.c: Spawn extension (ext-trunk, tdial, 10) exited non-zero on ‘SIP/107-00000015’
[2018-08-08 18:54:44] VERBOSE[11059][C-00000009] app_stack.c: SIP/107-00000015 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

The issue was solved turns out my Cisco Gateway was terminating the call due to an issue on the ISDN provider part

1 Like

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