Outgoing Fax Failures via SPA112 ATA Extension

I currently have a the following configuration in place now and it DOES seem to accept incoming faxes. For some reason the fax machine gives a TX COMM ERROR at the end of receiving a fax but it DOES fully receive and print it. I’m planning on replacing the machine very soon so that could be resolved by that and I am not entirely concerned with that issue. However outgoing faxes seem to fail and retry repeatedly though.

  1. Created a new CHAN_PJSIP extension for the SPA112 to connect to (1005)
  2. Modified my incoming route options to Detect Faxes via SIP and send them to extension 1005 previously created.
  3. In Asterisk SIP Settings -> SIP Settings -> Chan SIP Settings -> Advanced General Settigngs I added faxdetect=yes
  4. Add the following lines to the extensions_custom.conf file to force detected faxes to extension 1005:
    [ext-group-custom]
    exten => fax,1,Noop(Fax detected!)
    same => n,Dial(Local/[email protected])

I have not modified the trunk incoming or outgoing contexts at all so far if there is something I should do there.

The RX and TX speeds on the fax machine are both set to 14.4 - @astbox recommended I try dropping the TX speed but I have not had a chance to try that yet.

Below is the log excerpt from /var/log/asterisk/full from an outgoing fax attempt. I removed my DID and put <mySIP_DID> in place and the destination fax number and put <destination_FAX> in place of that. Looking through it this I think that was the only personal info in the log? If useful I can grab the CDR log as well for this attempt. What is odd though is the CDR log shows the outbound call for 17 seconds (timestamp 10:26:25 in log) going from my internal fax extension 1005 to the destination fax number. Then at the end of those 17 seconds (timestamp 10:26:42 in log) it shows a source of the destination fax number with a destination of “fax” and for 0 seconds.

[2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:1] Macro("PJSIP/1005-00000024", "user-callerid,LIMIT,EXTERNAL,") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] Set("PJSIP/1005-00000024", "TOUCH_MONITOR=1467221185.191") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:2] Set("PJSIP/1005-00000024", "AMPUSER=1005") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] GotoIf("PJSIP/1005-00000024", "0?report") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:4] ExecIf("PJSIP/1005-00000024", "1?Set(REALCALLERIDNUM=1005)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:5] Set("PJSIP/1005-00000024", "AMPUSER=1005") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:6] GotoIf("PJSIP/1005-00000024", "0?limit") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:7] Set("PJSIP/1005-00000024", "AMPUSERCIDNAME=Fax Machine") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:8] GotoIf("PJSIP/1005-00000024", "0?report") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:9] Set("PJSIP/1005-00000024", "AMPUSERCID=1005") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:10] Set("PJSIP/1005-00000024", "__DIAL_OPTIONS=Ttr") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:11] Set("PJSIP/1005-00000024", "CALLERID(all)="Fax Machine" <1005>") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:12] GotoIf("PJSIP/1005-00000024", "0?limit") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:13] ExecIf("PJSIP/1005-00000024", "1?Set(GROUP(concurrency_limit)=1005)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:14] ExecIf("PJSIP/1005-00000024", "1?Set(CHANNEL(language)=en)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:15] GotoIf("PJSIP/1005-00000024", "1?continue") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (macro-user-callerid,s,29) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:29] Set("PJSIP/1005-00000024", "CALLERID(number)=1005") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:30] Set("PJSIP/1005-00000024", "CALLERID(name)=Fax Machine") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:31] Set("PJSIP/1005-00000024", "CDR(cnum)=1005") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:32] Set("PJSIP/1005-00000024", "CDR(cnam)=Fax Machine") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:33] Set("PJSIP/1005-00000024", "CHANNEL(language)=en") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:2] Gosub("PJSIP/1005-00000024", "sub-record-check,s,1(out,<destination_FAX>,dontcare)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] GotoIf("PJSIP/1005-00000024", "0?initialized") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:2] Set("PJSIP/1005-00000024", "__REC_STATUS=INITIALIZED") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] Set("PJSIP/1005-00000024", "NOW=1467221185") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:4] Set("PJSIP/1005-00000024", "__DAY=29") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:5] Set("PJSIP/1005-00000024", "__MONTH=06") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:6] Set("PJSIP/1005-00000024", "__YEAR=2016") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:7] Set("PJSIP/1005-00000024", "__TIMESTR=20160629-102625") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:8] Set("PJSIP/1005-00000024", "__FROMEXTEN=1005") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:9] Set("PJSIP/1005-00000024", "__MON_FMT=wav") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:10] NoOp("PJSIP/1005-00000024", "Recordings initialized") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:11] ExecIf("PJSIP/1005-00000024", "0?Set(ARG3=dontcare)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:12] Set("PJSIP/1005-00000024", "REC_POLICY_MODE_SAVE=") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:13] ExecIf("PJSIP/1005-00000024", "0?Set(REC_STATUS=NO)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:14] GotoIf("PJSIP/1005-00000024", "3?checkaction") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (sub-record-check,s,17) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:17] GotoIf("PJSIP/1005-00000024", "1?sub-record-check,out,1") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (sub-record-check,out,1) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] NoOp("PJSIP/1005-00000024", "Outbound Recording Check from 1005 to <destination_FAX>") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:2] Set("PJSIP/1005-00000024", "RECMODE=dontcare") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] ExecIf("PJSIP/1005-00000024", "1?Goto(routewins)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (sub-record-check,out,7) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:7] Gosub("PJSIP/1005-00000024", "recordcheck,1(dontcare,out,<destination_FAX>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] NoOp("PJSIP/1005-00000024", "Starting recording check against dontcare") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:2] Goto("PJSIP/1005-00000024", "dontcare") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (sub-record-check,recordcheck,3) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] Return("PJSIP/1005-00000024", "") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:8] Return("PJSIP/1005-00000024", "") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:3] ExecIf("PJSIP/1005-00000024", "0 ?Set(CDR(accountcode)=)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:4] Set("PJSIP/1005-00000024", "EMERGENCYROUTE=YES") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:5] Set("PJSIP/1005-00000024", "MOHCLASS=default") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:6] ExecIf("PJSIP/1005-00000024", "1?Set(TRUNKCIDOVERRIDE=<mySIP_DID>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:7] Set("PJSIP/1005-00000024", "_NODEST=") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [<destination_FAX>@from-internal:8] Macro("PJSIP/1005-00000024", "dialout-trunk,2,<destination_FAX>,,off") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] Set("PJSIP/1005-00000024", "DIAL_TRUNK=2") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:2] GosubIf("PJSIP/1005-00000024", "0?sub-pincheck,s,1()") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] GotoIf("PJSIP/1005-00000024", "0?disabletrunk,1") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:4] Set("PJSIP/1005-00000024", "DIAL_NUMBER=<destination_FAX>") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:5] Set("PJSIP/1005-00000024", "DIAL_TRUNK_OPTIONS=Ttr") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:6] Set("PJSIP/1005-00000024", "OUTBOUND_GROUP=OUT_2") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:7] GotoIf("PJSIP/1005-00000024", "0?nomax") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:8] GotoIf("PJSIP/1005-00000024", "0?chanfull") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:9] GotoIf("PJSIP/1005-00000024", "0?skipoutcid") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:10] Set("PJSIP/1005-00000024", "DIAL_TRUNK_OPTIONS=T") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:11] Macro("PJSIP/1005-00000024", "outbound-callerid,2") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] ExecIf("PJSIP/1005-00000024", "0?Set(CALLERPRES(name-pres)=)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:2] ExecIf("PJSIP/1005-00000024", "0?Set(CALLERPRES(num-pres)=)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] ExecIf("PJSIP/1005-00000024", "0?Set(REALCALLERIDNUM=1005)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:4] GotoIf("PJSIP/1005-00000024", "1?normcid") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (macro-outbound-callerid,s,7) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:7] Set("PJSIP/1005-00000024", "USEROUTCID=") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:8] Set("PJSIP/1005-00000024", "EMERGENCYCID=") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:9] Set("PJSIP/1005-00000024", "TRUNKOUTCID=<mySIP_DID>") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:10] GotoIf("PJSIP/1005-00000024", "1?trunkcid") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (macro-outbound-callerid,s,15) [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:15] ExecIf("PJSIP/1005-00000024", "1?Set(CALLERID(all)=<mySIP_DID>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:16] ExecIf("PJSIP/1005-00000024", "0?Set(CALLERID(all)=)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:17] ExecIf("PJSIP/1005-00000024", "1?Set(CALLERID(all)=<mySIP_DID>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:18] ExecIf("PJSIP/1005-00000024", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:19] ExecIf("PJSIP/1005-00000024", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:20] Set("PJSIP/1005-00000024", "CDR(outbound_cnum)=<mySIP_DID>") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:21] Set("PJSIP/1005-00000024", "CDR(outbound_cnam)=") in new stack [2016-06-29 10:26:25] WARNING[24598] func_cdr.c: CDR requires a value (CDR(variable)=value) )[2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:12] GosubIf("PJSIP/1005-00000024", "0?sub-flp-2,s,1()") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:13] Set("PJSIP/1005-00000024", "OUTNUM=<destination_FAX>") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:14] Set("PJSIP/1005-00000024", "custom=SIP/vitel-outbound") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:15] ExecIf("PJSIP/1005-00000024", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:16] ExecIf("PJSIP/1005-00000024", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:17] Macro("PJSIP/1005-00000024", "dialout-trunk-predial-hook,") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] MacroExit("PJSIP/1005-00000024", "") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:18] GotoIf("PJSIP/1005-00000024", "0?bypass,1") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:19] ExecIf("PJSIP/1005-00000024", "1?Set(CONNECTEDLINE(num,i)=<destination_FAX>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:20] ExecIf("PJSIP/1005-00000024", "1?Set(CONNECTEDLINE(name,i)=CID:<mySIP_DID>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:21] ExecIf("PJSIP/1005-00000024", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)<mySIP_DID>)") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:22] GotoIf("PJSIP/1005-00000024", "0?customtrunk") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:23] Dial("PJSIP/1005-00000024", "SIP/vitel-outbound/<destination_FAX>,300,T") in new stack [2016-06-29 10:26:25] VERBOSE[495][C-00000062] netsock2.c: Using SIP RTP TOS bits 184 [2016-06-29 10:26:25] VERBOSE[495][C-00000062] netsock2.c: Using SIP RTP CoS mark 5 [2016-06-29 10:26:25] VERBOSE[495][C-00000062] app_dial.c: Called SIP/vitel-outbound/<destination_FAX> [2016-06-29 10:26:26] VERBOSE[495][C-00000062] app_dial.c: SIP/vitel-outbound-00000090 is ringing [2016-06-29 10:26:26] VERBOSE[495][C-00000062] app_dial.c: SIP/vitel-outbound-00000090 is making progress passing it to PJSIP/1005-00000024 [2016-06-29 10:26:36] VERBOSE[495][C-00000062] app_dial.c: SIP/vitel-outbound-00000090 answered PJSIP/1005-00000024 [2016-06-29 10:26:36] VERBOSE[516][C-00000062] bridge_channel.c: Channel SIP/vitel-outbound-00000090 joined 'simple_bridge' basic-bridge <54e0c596-f70f-48f3-baba-518a6f7d2ac0> [2016-06-29 10:26:36] VERBOSE[495][C-00000062] bridge_channel.c: Channel PJSIP/1005-00000024 joined 'simple_bridge' basic-bridge <54e0c596-f70f-48f3-baba-518a6f7d2ac0> [2016-06-29 10:26:42] VERBOSE[516][C-00000062] chan_sip.c: Redirecting 'SIP/vitel-outbound-00000090' to fax extension due to CNG detection [2016-06-29 10:26:42] VERBOSE[516][C-00000062] bridge_channel.c: Channel SIP/vitel-outbound-00000090 left 'simple_bridge' basic-bridge <54e0c596-f70f-48f3-baba-518a6f7d2ac0> [2016-06-29 10:26:42] VERBOSE[495][C-00000062] bridge_channel.c: Channel PJSIP/1005-00000024 left 'simple_bridge' basic-bridge <54e0c596-f70f-48f3-baba-518a6f7d2ac0> [2016-06-29 10:26:42] VERBOSE[495][C-00000062] app_macro.c: Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/1005-00000024' in macro 'dialout-trunk' [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx.c: Spawn extension (from-internal, <destination_FAX>, 8) exited non-zero on 'PJSIP/1005-00000024' [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] Macro("PJSIP/1005-00000024", "hangupcall") in new stack [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:1] GotoIf("PJSIP/1005-00000024", "1?theend") in new stack [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx_builtins.c: Goto (macro-hangupcall,s,3) [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:3] ExecIf("PJSIP/1005-00000024", "0?Set(CDR(recordingfile)=)") in new stack [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx.c: Executing [[email protected]:4] Hangup("PJSIP/1005-00000024", "") in new stack [2016-06-29 10:26:42] VERBOSE[495][C-00000062] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/1005-00000024' in macro 'hangupcall' [2016-06-29 10:26:42] VERBOSE[495][C-00000062] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/1005-00000024' [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Executing [[email protected]:1] Set("SIP/vitel-outbound-00000090", "__DIRECTION=INBOUND") in new stack [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Executing [[email protected]:2] Goto("SIP/vitel-outbound-00000090", ",,") in new stack [2016-06-29 10:26:42] NOTICE[516][C-00000062] pbx.c: Cannot find extension context '' [2016-06-29 10:26:42] WARNING[516][C-00000062] pbx.c: Priority '' must be a number > 0, or valid label [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Spawn extension (from-trunk, fax, 2) exited non-zero on 'SIP/vitel-outbound-00000090' [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Executing [[email protected]:1] Macro("SIP/vitel-outbound-00000090", "hangupcall,") in new stack [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Executing [[email protected]:1] GotoIf("SIP/vitel-outbound-00000090", "1?theend") in new stack [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx_builtins.c: Goto (macro-hangupcall,s,3) [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Executing [[email protected]:3] ExecIf("SIP/vitel-outbound-00000090", "0?Set(CDR(recordingfile)=)") in new stack [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Executing [[email protected]:4] Hangup("SIP/vitel-outbound-00000090", "") in new stack [2016-06-29 10:26:42] VERBOSE[516][C-00000062] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/vitel-outbound-00000090' in macro 'hangupcall' [2016-06-29 10:26:42] VERBOSE[516][C-00000062] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on 'SIP/vitel-outbound-00000090'

Well the faxdetection tries to send the call to the fax extension.

Do you try to dial out from the same trunk that you receive your calls including fax?

Yup right now we are using a single trunk for inbound/outbound. The fax machine is on ext 1005. Incoming calls get forwarded to that extension. Outbound calls will originate from that extension.

Remove the faxdetect from the sip settings and try again. Also test the inbound fax again.

Sorry about the delay, I was out of town for the long weekend and then had a lot of catching up to do. Do you mean just remove faxdetect=yes from the Asterisk SIP Settings? I did do that and it does look to work. So the only changes we made then to get this all working is to setup the incoming with the following steps:

  1. On the inbound route enable fax detection and route to the appropriate extension
  2. Open extensions_custom.conf file and put this over the from-internal-custom

[ext-group-custom]
exten => fax,1,Noop(Fax detected!)
same => n,Dial(Local/[email protected])

  1. Make any random change and Apply Config to get the settings to apply

This looks like its receiving faxes ok and detecting as appropriate as well as transmitting with no problems. Incoming faxes seem from testing seem to have an issue with the transmitting machine confirming a fax has sent but it could just be a random fluke here. I’ll try dropping my speed and deal with that as time goes. However as of right now it looks like everything is working ok!

What is the purpose of adding the faxdetect=yes to the Asterisk SIP Settings in addition to the inbound route? They obviously don’t perform exactly the same as we just proved. This is more for my future knowledge at this point.

Try to remove the dialplan from the extensions_custom. I think that the receiving will work without it.

If you put it in the sip settings it is enabled globally and this as you saw cause problems.

We needed that though based on the other thread or I got the error “FAX CNG detected but no fax extension”. I’m happy to remove and test it though if you’d like?

Well just commented out this part, put in fron of each line the following symbol

;

and reload your asterisk. It will not be used any more, if you see that you have again problem then enable it again.