[SOLVED] Set Variable DIAL_OPTIONS not working

hi, guys thanks for time and help
i have agi logic for set max call limite time but is not working

in the dial plain execution i see this:

– Executing [s@macro-dialout-trunk:5] Set(“SIP/1000-00002970”, “DIAL_TRUNK_OPTIONS=tL(120000:30000:15000)”) in new stack

but in the dial plan last step:

– Executing [s@macro-dialout-trunk:23] Dial(“SIP/1000-00002970”, “SIP/TO_PSNT_BPX/3056548950,300,T”) in new stack

the changes are not being applied in the dialplan

I’m not saying that this is specifically what’s happening, but we know from other posts that some dial options are “disabled” in the FreePBX generated dial plans because they present security problems if left “in the wild” and in certain situations.

it might also be that FreePBX Is not parsing your dial options correctly. This could indicate a bug or might be a “feature” that the developers have decided to implement on purpose.

Since there is a possibility that it could be a bug, I’d suggest adding an “Issues” ticket to the mix so that the problem can be triaged by the developers. It might be something that isn’t expected in the dial options, so you might also need to mark is as a feature request if it turns out that it’s not something the system was designed to handle.

A ticket is premature at this point, it will probably just be sent back here for discussion. The starting point is a full log trace beginning to end.
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs

True enough. I was just suggesting that having the ticket in his pocket wouldn’t hurt.

On the other hand, a full trace would help us “mere users” better see what’s happening to see if we can see what’s up.

1 Like

Hi, thanks for time and help

next the full call trace log:

> full:[2018-08-02 15:04:12] VERBOSE[4619][C-000015b5] netsock2.c:   == Using SIP VIDEO CoS mark 6
> full:[2018-08-02 15:04:12] VERBOSE[4619][C-000015b5] netsock2.c:   == Using SIP RTP CoS mark 5
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:1] Macro("SIP/1000-00002970", "user-callerid,LIMIT,EXTERNAL,") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/1000-00002970", "TOUCH_MONITOR=AST01-1533236652.16217") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:2] Set("SIP/1000-00002970", "AMPUSER=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:3] GotoIf("SIP/1000-00002970", "0?report") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:4] ExecIf("SIP/1000-00002970", "1?Set(REALCALLERIDNUM=1000)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/1000-00002970", "AMPUSER=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/1000-00002970", "0?limit") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:7] Set("SIP/1000-00002970", "AMPUSERCIDNAME=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:8] GotoIf("SIP/1000-00002970", "0?report") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:9] Set("SIP/1000-00002970", "AMPUSERCID=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:10] Set("SIP/1000-00002970", "__DIAL_OPTIONS=Ttr") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:11] Set("SIP/1000-00002970", "CALLERID(all)="1000" <1000>") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:12] GotoIf("SIP/1000-00002970", "0?limit") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:13] ExecIf("SIP/1000-00002970", "1?Set(GROUP(concurrency_limit)=1000)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:14] ExecIf("SIP/1000-00002970", "0?Set(CHANNEL(language)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:15] GotoIf("SIP/1000-00002970", "1?continue") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (macro-user-callerid,s,29)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:29] Set("SIP/1000-00002970", "CALLERID(number)=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:30] Set("SIP/1000-00002970", "CALLERID(name)=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:31] GotoIf("SIP/1000-00002970", "0?cnum") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:32] Set("SIP/1000-00002970", "CDR(cnam)=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:33] Set("SIP/1000-00002970", "CDR(cnum)=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-user-callerid:34] Set("SIP/1000-00002970", "CHANNEL(language)=es") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:2] Gosub("SIP/1000-00002970", "sub-record-check,s,1(out,93056548950,dontcare)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:1] Set("SIP/1000-00002970", "NoOp=Ivoxs Call Recording Manager") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:2] Set("SIP/1000-00002970", "type=NORMAL") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:3] Set("SIP/1000-00002970", "channel=SIP/1000-00002970") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:4] Set("SIP/1000-00002970", "account=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:5] Set("SIP/1000-00002970", "sname=AST01") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:6] Set("SIP/1000-00002970", "datetime=2018-08-02 15:04:12") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:7] Set("SIP/1000-00002970", "filedir=20180802") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:8] Set("SIP/1000-00002970", "getuid=AST01-1533236652.16217") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:9] Set("SIP/1000-00002970", "getlid=AST01-1533236652.16217") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:10] Set("SIP/1000-00002970", "context=sub-record-check") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:11] Set("SIP/1000-00002970", "mcontext=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:12] Set("SIP/1000-00002970", "ext1=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:13] Set("SIP/1000-00002970", "ext2=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:14] Set("SIP/1000-00002970", "ext3=93056548950") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:15] Set("SIP/1000-00002970", "ext4=out") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:16] Set("SIP/1000-00002970", "ext5=dontcare") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:17] AGI("SIP/1000-00002970", "agi://192.168.97.240/icrm_index_normal.agi") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] res_agi.c:     -- AGI Script Executing Application: (Mixmonitor) Options: (/ivoxs/spool/asterisk/monitor/ASTPSTN01/sound/2018/08/02/ASTPSTN01-1533236632.571738.wav,av(0)V(0))
> full:[2018-08-02 15:04:12] VERBOSE[30475][C-000015b5] app_mixmonitor.c:   == Begin MixMonitor Recording SIP/1000-00002970
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] res_agi.c:     -- <SIP/1000-00002970>AGI Script agi://192.168.97.240/icrm_index_normal.agi completed, returning 0
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:18] AGI("SIP/1000-00002970", "agi://192.168.97.240/iccm_index.agi") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] res_agi.c:     -- <SIP/1000-00002970>AGI Script agi://192.168.97.240/iccm_index.agi completed, returning 0
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:19] NoOp("SIP/1000-00002970", "Recordings initialized") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:20] ExecIf("SIP/1000-00002970", "0?Set(ARG3=dontcare)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:21] Set("SIP/1000-00002970", "REC_POLICY_MODE_SAVE=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:22] ExecIf("SIP/1000-00002970", "0?Set(REC_STATUS=NO)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:23] GotoIf("SIP/1000-00002970", "3?checkaction") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (sub-record-check,s,26)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@sub-record-check:26] GotoIf("SIP/1000-00002970", "1?sub-record-check,out,1") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (sub-record-check,out,1)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [out@sub-record-check:1] NoOp("SIP/1000-00002970", "Outbound Recording Check from  to 93056548950") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [out@sub-record-check:2] Set("SIP/1000-00002970", "RECMODE=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [out@sub-record-check:3] ExecIf("SIP/1000-00002970", "1?Goto(routewins)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (sub-record-check,out,7)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [out@sub-record-check:7] Gosub("SIP/1000-00002970", "recordcheck,1(dontcare,out,93056548950)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [recordcheck@sub-record-check:1] NoOp("SIP/1000-00002970", "Starting recording check against dontcare") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [recordcheck@sub-record-check:2] Goto("SIP/1000-00002970", "dontcare") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (sub-record-check,recordcheck,3)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [recordcheck@sub-record-check:3] Return("SIP/1000-00002970", "") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [out@sub-record-check:8] Return("SIP/1000-00002970", "") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:3] Macro("SIP/1000-00002970", "ivoxscbm,") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:1] NoOp("SIP/1000-00002970", "Ivoxs Call Billing Manager") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:2] Set("SIP/1000-00002970", "type=NORMAL") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:3] Set("SIP/1000-00002970", "channel=SIP/1000-00002970") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:4] Set("SIP/1000-00002970", "dstchannel=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:5] Set("SIP/1000-00002970", "account=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:6] Set("SIP/1000-00002970", "sname=AST01") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:7] Set("SIP/1000-00002970", "datetime=2018-08-02 15:04:12") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:8] Set("SIP/1000-00002970", "filedir=20180802") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:9] Set("SIP/1000-00002970", "renable=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:10] Set("SIP/1000-00002970", "getuid=AST01-1533236652.16217") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:11] Set("SIP/1000-00002970", "context=macro-ivoxscbm") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:12] Set("SIP/1000-00002970", "ext=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:13] AGI("SIP/1000-00002970", "agi://192.168.97.240/icbm_index.agi") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] res_agi.c:     -- <SIP/1000-00002970>AGI Script agi://192.168.97.240/icbm_index.agi completed, returning 0
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-ivoxscbm:14] MacroExit("SIP/1000-00002970", "") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:4] ExecIf("SIP/1000-00002970", "0 ?Set(CDR(accountcode)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:5] Set("SIP/1000-00002970", "MOHCLASS=default") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:6] Set("SIP/1000-00002970", "_NODEST=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [93056548950@from-internal:7] Macro("SIP/1000-00002970", "dialout-trunk,1,3056548950,,off") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:1] Set("SIP/1000-00002970", "DIAL_TRUNK=1") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1000-00002970", "0?sub-pincheck,s,1()") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1000-00002970", "0?disabletrunk,1") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:4] Set("SIP/1000-00002970", "DIAL_NUMBER=3056548950") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:5] Set("SIP/1000-00002970", "DIAL_TRUNK_OPTIONS=tL(120000:30000:15000)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:6] Set("SIP/1000-00002970", "OUTBOUND_GROUP=OUT_1") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1000-00002970", "1?nomax") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (macro-dialout-trunk,s,9)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1000-00002970", "0?skipoutcid") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:10] Set("SIP/1000-00002970", "DIAL_TRUNK_OPTIONS=T") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:11] Macro("SIP/1000-00002970", "outbound-callerid,1") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/1000-00002970", "0?Set(CALLERPRES(name-pres)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/1000-00002970", "0?Set(CALLERPRES(num-pres)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:3] ExecIf("SIP/1000-00002970", "0?Set(REALCALLERIDNUM=1000)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:4] GotoIf("SIP/1000-00002970", "1?normcid") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (macro-outbound-callerid,s,7)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:7] Set("SIP/1000-00002970", "USEROUTCID=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:8] Set("SIP/1000-00002970", "EMERGENCYCID=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:9] Set("SIP/1000-00002970", "TRUNKOUTCID=") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:10] GotoIf("SIP/1000-00002970", "1?trunkcid") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (macro-outbound-callerid,s,15)
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/1000-00002970", "0?Set(CALLERID(all)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:16] ExecIf("SIP/1000-00002970", "0?Set(CALLERID(all)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:17] ExecIf("SIP/1000-00002970", "0?Set(CALLERID(all)=)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:18] ExecIf("SIP/1000-00002970", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:19] ExecIf("SIP/1000-00002970", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:20] Set("SIP/1000-00002970", "CDR(outbound_cnum)=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-outbound-callerid:21] Set("SIP/1000-00002970", "CDR(outbound_cnam)=1000") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/1000-00002970", "0?sub-flp-1,s,1()") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:13] Set("SIP/1000-00002970", "OUTNUM=3056548950") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:14] Set("SIP/1000-00002970", "custom=SIP/TO_AST01") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1000-00002970", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/1000-00002970", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:17] Macro("SIP/1000-00002970", "dialout-trunk-predial-hook,") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1000-00002970", "") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1000-00002970", "0?bypass,1") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/1000-00002970", "1?Set(CONNECTEDLINE(num,i)=3056548950)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/1000-00002970", "1?Set(CONNECTEDLINE(name,i)=CID:1000)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:21] ExecIf("SIP/1000-00002970", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)1000)") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:22] GotoIf("SIP/1000-00002970", "0?customtrunk") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:23] Dial("SIP/1000-00002970", "SIP/TO_AST01/3056548950,300,T") in new stack
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] netsock2.c:   == Using SIP RTP CoS mark 5
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] app_dial.c:     -- Called SIP/TO_AST01/3056548950
> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] app_dial.c:     -- SIP/TO_AST01-00002971 is ringing
> full:[2018-08-02 15:04:13] VERBOSE[30471][C-000015b5] app_dial.c:     -- SIP/TO_AST01-00002971 answered SIP/1000-00002970
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [h@macro-dialout-trunk:1] Macro("SIP/1000-00002970", "hangupcall,") in new stack
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-hangupcall:1] ExecIf("SIP/1000-00002970", "0?Set(CDR(recordingfile)=.)") in new stack
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-hangupcall:2] GotoIf("SIP/1000-00002970", "1?theend") in new stack
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:     -- Goto (macro-hangupcall,s,4)
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-hangupcall:4] ExecIf("SIP/1000-00002970", "0?Set(CDR(recordingfile)=)") in new stack
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-hangupcall:5] Hangup("SIP/1000-00002970", "") in new stack
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] app_macro.c:   == Spawn extension (macro-hangupcall, s, 5) exited non-zero on 'SIP/1000-00002970' in macro 'hangupcall'
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:   == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/1000-00002970'
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] app_macro.c:   == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'SIP/1000-00002970' in macro 'dialout-trunk'
> full:[2018-08-02 15:04:18] VERBOSE[30471][C-000015b5] pbx.c:   == Spawn extension (from-internal, 93056548950, 7) exited non-zero on 'SIP/1000-00002970'
> full:[2018-08-02 15:04:18] VERBOSE[30475][C-000015b5] app_mixmonitor.c:   == MixMonitor close filestream (mixed)
> full:[2018-08-02 15:04:18] VERBOSE[30475][C-000015b5] app_mixmonitor.c:   == End MixMonitor Recording SIP/1000-00002970

Priority 5:

> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:5] Set("SIP/1000-00002970", "DIAL_TRUNK_OPTIONS=tL(120000:30000:15000)") in new stack

5 lines later at priority 10:

> full:[2018-08-02 15:04:12] VERBOSE[30471][C-000015b5] pbx.c:     -- Executing [s@macro-dialout-trunk:10] Set("SIP/1000-00002970", "DIAL_TRUNK_OPTIONS=T") in new stack

yes i see it but is not working if i change the next line in the extensions_additional.conf

from this:

exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})

to this:

exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS}${DIAL_OPTIONS})

adding the var ${DIAL_OPTIONS} to the end of the line works fine even in the dialplan I can see that logic is executed

becuase i see this:
– Executing [s@macro-dialout-trunk:23] Dial(“SIP/1000-0000452d”, “SIP/TO_AST01/3056548950,300,TtL(120000:30000:15000)”) in new stack
> Limit Data for this call:
> timelimit = 120000 ms (120.000 s)
> play_warning = 30000 ms (30.000 s)
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 15000 ms (15.000 s)
> start_sound =
> warning_sound = beep
> end_sound = vm-goodbye

Hello @chacaman ,

Your dial options of the trunk are not kept in the asterisk database, and that is why they are getting overridden by the default trunk dial options (T). I do not know exactly what you are doing in your AGI script,
but you can bypass your dialplan behavior through the macro-dialout-trunk-predial-hook context.
You can declare it in the extensions_custom.conf file, like that:

 [macro-dialout-trunk-predial-hook]
 exten => s,1,Set(DIAL_TRUNK_OPTIONS=${STRREPLACE(DIAL_TRUNK_OPTIONS,T,tL(120000:30000:15000))})
 exten => s,n,MacroExit()

Just be aware that this will affect all of your outbound calls, so you may add some logic to my suggested dialplan. Also, be aware that if you will change your default trunk dial options, you will have to adjust my suggested dialplan to your needs.

If you want to do it through the Freepbx GUI, you can override the default trunk dial options in the trunk settings, or to change the default outgoing dialplan options in the advanced settings.

Thank you,

Daniel Friedman

1 Like

@danielf thanks for your time is working!

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