Hi guys, I am tryng to “play” with dialplain and setting up a variable but it’s happening something that I cannot understand ( due to my lack on asterrisk knowladge )
As you can see on CLI log a setted up a $ vm_owner but it seems to be lost going through the executiong of a call.
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [3950@from-trunk-sip-TG_SIP_LW:1] Set(“SIP/TG_SIP_LW-0000008c”, “GROUP()=OUT_2”) in new stack
– Executing [3950@from-trunk-sip-TG_SIP_LW:2] Goto(“SIP/TG_SIP_LW-0000008c”, “from-trunk,3950,1”) in new stack
– Goto (from-trunk,3950,1)
– Executing [3950@from-trunk:1] Set(“SIP/TG_SIP_LW-0000008c”, “__FROM_DID=3950”) in new stack
– Executing [3950@from-trunk:2] Gosub(“SIP/TG_SIP_LW-0000008c”, “app-blacklist-check,s,1”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:2] Set(“SIP/TG_SIP_LW-0000008c”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/TG_SIP_LW-0000008c”, “”) in new stack
– Executing [3950@from-trunk:3] ExecIf(“SIP/TG_SIP_LW-0000008c”, “0 ?Set(CALLERID(name)=2542)”) in new stack
– Executing [3950@from-trunk:4] Set(“SIP/TG_SIP_LW-0000008c”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [3950@from-trunk:5] Set(“SIP/TG_SIP_LW-0000008c”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [3950@from-trunk:6] Set(“SIP/TG_SIP_LW-0000008c”, “FAX_DEST=ext-fax^3950^1”) in new stack
– Executing [3950@from-trunk:7] Set(“SIP/TG_SIP_LW-0000008c”, “vm_owner=sip:3950@172.16.52.123;user=phone”) in new stack
– Executing [3950@from-trunk:8] Set(“SIP/TG_SIP_LW-0000008c”, “vm_owner=<sip:3950”) in new stack
– Executing [3950@from-trunk:9] Set(“SIP/TG_SIP_LW-0000008c”, “vm_owner=3950”) in new stack
– Executing [3950@from-trunk:10] Answer(“SIP/TG_SIP_LW-0000008c”, “”) in new stack
– Executing [3950@from-trunk:11] Wait(“SIP/TG_SIP_LW-0000008c”, “4”) in new stack
– Executing [3950@from-trunk:12] Goto(“SIP/TG_SIP_LW-0000008c”, “from-did-direct,3950,1”) in new stack
– Goto (from-did-direct,3950,1)
– Executing [3950@from-did-direct:1] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?ext-local,3950,1”) in new stack
– Executing [3950@from-did-direct:2] Macro(“SIP/TG_SIP_LW-0000008c”, “user-callerid,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/TG_SIP_LW-0000008c”, “AMPUSER=2542”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/TG_SIP_LW-0000008c”, “1?Set(REALCALLERIDNUM=2542)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/TG_SIP_LW-0000008c”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/TG_SIP_LW-0000008c”, “AMPUSERCIDNAME=”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:14] Set(“SIP/TG_SIP_LW-0000008c”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:15] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@macro-user-callerid:26] Set(“SIP/TG_SIP_LW-0000008c”, “CALLERID(number)=2542”) in new stack
– Executing [s@macro-user-callerid:27] Set(“SIP/TG_SIP_LW-0000008c”, “CALLERID(name)=Spirandelli Anto”) in new stack
– Executing [s@macro-user-callerid:28] Set(“SIP/TG_SIP_LW-0000008c”, “CHANNEL(language)=en”) in new stack
– Executing [3950@from-did-direct:3] Set(“SIP/TG_SIP_LW-0000008c”, “__EXTTOCALL=3950”) in new stack
– Executing [3950@from-did-direct:4] Set(“SIP/TG_SIP_LW-0000008c”, “__PICKUPMARK=3950”) in new stack
– Executing [3950@from-did-direct:5] Macro(“SIP/TG_SIP_LW-0000008c”, “blkvm-setifempty,”) in new stack
– Executing [s@macro-blkvm-setifempty:1] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?init”) in new stack
– Goto (macro-blkvm-setifempty,s,4)
– Executing [s@macro-blkvm-setifempty:4] Set(“SIP/TG_SIP_LW-0000008c”, “__BLKVM_CHANNEL=SIP/TG_SIP_LW-0000008c”) in new stack
– Executing [s@macro-blkvm-setifempty:5] Set(“SIP/TG_SIP_LW-0000008c”, “SHARED(BLKVM,SIP/TG_SIP_LW-0000008c)=TRUE”) in new stack
– Executing [s@macro-blkvm-setifempty:6] Set(“SIP/TG_SIP_LW-0000008c”, “GOSUB_RETVAL=TRUE”) in new stack
– Executing [s@macro-blkvm-setifempty:7] MacroExit(“SIP/TG_SIP_LW-0000008c”, “”) in new stack
– Executing [3950@from-did-direct:6] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?skipov”) in new stack
– Goto (from-did-direct,3950,9)
– Executing [3950@from-did-direct:9] Set(“SIP/TG_SIP_LW-0000008c”, “RRNODEST=”) in new stack
– Executing [3950@from-did-direct:10] Set(“SIP/TG_SIP_LW-0000008c”, “__NODEST=3950”) in new stack
– Executing [3950@from-did-direct:11] GosubIf(“SIP/TG_SIP_LW-0000008c”, “0?sub-fmsetcid,s,1”) in new stack
– Executing [3950@from-did-direct:12] Set(“SIP/TG_SIP_LW-0000008c”, “RecordMethod=Group”) in new stack
– Executing [3950@from-did-direct:13] Macro(“SIP/TG_SIP_LW-0000008c”, “record-enable,3950-3950,Group”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] ExecIf(“SIP/TG_SIP_LW-0000008c”, “0?MacroExit()”) in new stack
– Executing [s@macro-record-enable:5] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?Group:OUT”) in new stack
– Goto (macro-record-enable,s,6)
– Executing [s@macro-record-enable:6] Set(“SIP/TG_SIP_LW-0000008c”, “LOOPCNT=2”) in new stack
– Executing [s@macro-record-enable:7] Set(“SIP/TG_SIP_LW-0000008c”, “ITER=1”) in new stack
– Executing [s@macro-record-enable:8] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?continue”) in new stack
– Goto (macro-record-enable,s,12)
– Executing [s@macro-record-enable:12] Set(“SIP/TG_SIP_LW-0000008c”, “ITER=2”) in new stack
– Executing [s@macro-record-enable:13] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?begin”) in new stack
– Goto (macro-record-enable,s,8)
– Executing [s@macro-record-enable:8] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?continue”) in new stack
– Goto (macro-record-enable,s,12)
– Executing [s@macro-record-enable:12] Set(“SIP/TG_SIP_LW-0000008c”, “ITER=3”) in new stack
– Executing [s@macro-record-enable:13] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?begin”) in new stack
– Executing [s@macro-record-enable:14] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?IN”) in new stack
– Executing [s@macro-record-enable:15] ExecIf(“SIP/TG_SIP_LW-0000008c”, “1?MacroExit()”) in new stack
– Executing [3950@from-did-direct:14] Set(“SIP/TG_SIP_LW-0000008c”, “RingGroupMethod=ringallv2”) in new stack
– Executing [3950@from-did-direct:15] Set(“SIP/TG_SIP_LW-0000008c”, “_FMGRP=3950”) in new stack
– Executing [3950@from-did-direct:16] GotoIf(“SIP/TG_SIP_LW-0000008c”, “0?doconfirm”) in new stack
– Executing [3950@from-did-direct:17] Macro(“SIP/TG_SIP_LW-0000008c”, “dial,24,tr,3950”) in new stack
– Executing [s@macro-dial:1] GotoIf(“SIP/TG_SIP_LW-0000008c”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing [s@macro-dial:3] AGI(“SIP/TG_SIP_LW-0000008c”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is ‘Spirandelli Anto’ number is ‘2542’
> dialparties.agi: USE_CONFIRMATION: ‘FALSE’
> dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is ‘ringallv2’
– dialparties.agi: Added extension 3950 to extension map
> dialparties.agi: got fmgrp_prering: 4, fmgrp_grptime: 20
> dialparties.agi: fmgrp_totalprering: 24
> dialparties.agi: found extension in pre-ring and array
> dialparties.agi: ringallv2 ring times: REALPRERING: 24, PRERING: 4
> dialparties.agi: Extension 3950 has call screening off
dialparties.agi: Extension 3950 has call forward set to 3999
> dialparties.agi: Primary ext is CF so disabling mastermode if it was set
> dialparties.agi: extnum 3999# has: cw: 0; hascfb: 0 [] hascfu: 0 []
> dialparties.agi: Built External dialstring component for 3999: Local/3999@from-internal/n
– dialparties.agi: Filtered ARG3: 3999
> dialparties.agi: NODEST: 3950 adding M(auto-blkvm) to dialopts: trM(auto-blkvm)
> dialparties.agi: NODEST: 3950 blkvm enabled macro already in dialopts: trM(auto-blkvm)
– <SIP/TG_SIP_LW-0000008c>AGI Script dialparties.agi completed, returning 0
– Executing [s@macro-dial:7] Dial(“SIP/TG_SIP_LW-0000008c”, “Local/3999@from-internal/n,24,trM(auto-blkvm)”) in new stack
– Called 3999@from-internal/n
– Executing [3999@from-internal:1] Macro(“Local/3999@from-internal-2596;2”, “user-callerid,LIMIT,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“Local/3999@from-internal-2596;2”, “AMPUSER=2542”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“Local/3999@from-internal-2596;2”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [s@macro-user-callerid:13] GotoIf(“Local/3999@from-internal-2596;2”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@macro-user-callerid:26] Set(“Local/3999@from-internal-2596;2”, “CALLERID(number)=2542”) in new stack
– Executing [s@macro-user-callerid:27] Set(“Local/3999@from-internal-2596;2”, “CALLERID(name)=Spirandelli Anto”) in new stack
– Executing [s@macro-user-callerid:28] Set(“Local/3999@from-internal-2596;2”, “CHANNEL(language)=en”) in new stack
– Executing [3999@from-internal:2] Set(“Local/3999@from-internal-2596;2”, “INTRACOMPANYROUTE=YES”) in new stack
– Executing [3999@from-internal:3] Set(“Local/3999@from-internal-2596;2”, “MOHCLASS=default”) in new stack
– Executing [3999@from-internal:4] Set(“Local/3999@from-internal-2596;2”, “_NODEST=”) in new stack
– Executing [3999@from-internal:5] Macro(“Local/3999@from-internal-2596;2”, “record-enable,2542,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“Local/3999@from-internal-2596;2”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] ExecIf(“Local/3999@from-internal-2596;2”, “0?MacroExit()”) in new stack
– Executing [s@macro-record-enable:5] GotoIf(“Local/3999@from-internal-2596;2”, “0?Group:OUT”) in new stack
– Goto (macro-record-enable,s,14)
– Executing [s@macro-record-enable:14] GotoIf(“Local/3999@from-internal-2596;2”, “0?IN”) in new stack
– Executing [s@macro-record-enable:15] ExecIf(“Local/3999@from-internal-2596;2”, “1?MacroExit()”) in new stack
– Executing [3999@from-internal:6] Macro(“Local/3999@from-internal-2596;2”, “dialout-trunk,1,3999,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“Local/3999@from-internal-2596;2”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“Local/3999@from-internal-2596;2”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“Local/3999@from-internal-2596;2”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“Local/3999@from-internal-2596;2”, “DIAL_NUMBER=3999”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“Local/3999@from-internal-2596;2”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“Local/3999@from-internal-2596;2”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“Local/3999@from-internal-2596;2”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“Local/3999@from-internal-2596;2”, “1?skipoutcid”) in new stack
– Goto (macro-dialout-trunk,s,12)
– Executing [s@macro-dialout-trunk:12] GosubIf(“Local/3999@from-internal-2596;2”, “0?sub-flp-1,s,1”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“Local/3999@from-internal-2596;2”, “OUTNUM=3999”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“Local/3999@from-internal-2596;2”, “custom=SIP/Exchange”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“Local/3999@from-internal-2596;2”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)tr)”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“Local/3999@from-internal-2596;2”, “0?Set(DIAL_TRUNK_OPTIONS=trM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“Local/3999@from-internal-2596;2”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“Local/3999@from-internal-2596;2”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“Local/3999@from-internal-2596;2”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“Local/3999@from-internal-2596;2”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] SIPAddHeader(“Local/3999@from-internal-2596;2”, “Diversion:tel:;reason=no-answer;screen=no;privacy=off”) in new stack
– Executing [s@macro-dialout-trunk:21] Dial(“Local/3999@from-internal-2596;2”, “SIP/Exchange/3999,300,tr”) in new stack
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called Exchange/3999
I need to pass that variable on " SIPAddHeader(“Local/3999@from-internal-2596;2”, “Diversion:tel:;reason=no-answer;screen=no;privacy=off”)" at the end of log.
Maybe is not passed because it jumps through different channels? ( as I know a variable is trashed after channel is closed, Am i wrong?
Please help me.
Thanks