DYNAMIC_FEATUREST not overwritten

Hi all,

I have a problem with DYNAMIC_FEATURES with Asterisk 13.21.1

When I overwrite the variable $ {DYNAMIC_FEATURE} during the call, the variable is overwritten(in dumpchan it see), but asterisk does not listen to the new features, but listens to the old features.
In Asterisk 11 its working!

ccnew-idle*CLI> features show
Builtin Feature           Default Current
---------------           ------- -------
Pickup                    *8      *8     
Blind Transfer            #       ##     
Attended Transfer                 *2     
One Touch Monitor                       
Disconnect Call           *       **     
Park Call                               
One Touch MixMonitor                     

Dynamic Feature           Default Current
---------------           ------- -------
apprecord                 no def  *1     
ATXFb-0                   no def  0     
ATXFb-1                   no def  1     
ATXFb-2                   no def  2     
ATXFb-3                   no def  3     
ATXFb-4                   no def  4     
ATXFb-5                   no def  5     
ATXFb-6                   no def  6     
ATXFb-7                   no def  7     
ATXFb-8                   no def  8     
ATXFb-9                   no def  9     
ATXFi-0                   no def  0     
ATXFi-1                   no def  1     
ATXFi-2                   no def  2     
ATXFi-3                   no def  3     
ATXFi-4                   no def  4     
ATXFi-5                   no def  5     
ATXFi-6                   no def  6     
ATXFi-7                   no def  7     
ATXFi-8                   no def  8     
ATXFi-9                   no def  9     
ATXFo-0                   no def  0     
ATXFo-1                   no def  1     
ATXFo-2                   no def  2     
ATXFo-3                   no def  3     
ATXFo-4                   no def  4     
ATXFo-5                   no def  5     
ATXFo-6                   no def  6     
ATXFo-7                   no def  7     
ATXFo-8                   no def  8     
ATXFo-9                   no def  9     
DTMFi                     no def  #     
DTMFo                     no def  #     
fax-send                  no def  *5     
fax-start                 no def  *6     
-- Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/011-000001de", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/011-000001de", "1?Set(CONNECTEDLINE(num,i)=19089141666889)") in new stack
    -- Executing [s@macro-dialout-trunk:22] ExecIf("PJSIP/011-000001de", "1?Set(CONNECTEDLINE(name,i)=CID:74212556430)") in new stack
    -- Executing [s@macro-dialout-trunk:23] ExecIf("PJSIP/011-000001de", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)74212556430)") in new stack
    -- Executing [s@macro-dialout-trunk:24] GotoIf("PJSIP/011-000001de", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:25] ExecIf("PJSIP/011-000001de", "0?Set(DIAL_TRUNK_OPTIONS=B(macro-dialout-trunk-predial-hook^caller_handler^1))") in new stack
    -- Executing [s@macro-dialout-trunk:26] Dial("PJSIP/011-000001de", "PJSIP/19089141666889@74212556430,300,TB(macro-dialout-trunk-predial-hook^caller_handler^1)b(func-apply-sipheaders^s^1,(1))") in new stack
    -- PJSIP/011-000001de Internal Gosub(macro-dialout-trunk-predial-hook,caller_handler,1) start
    -- Executing [caller_handler@macro-dialout-trunk-predial-hook:1] NoOp("PJSIP/011-000001de", "") in new stack
    -- Executing [caller_handler@macro-dialout-trunk-predial-hook:2] Set("PJSIP/011-000001de", "DYNAMIC_FEATURES=fax-send#fax-start#DTMFo") in new stack
    -- Executing [caller_handler@macro-dialout-trunk-predial-hook:3] Verbose("PJSIP/011-000001de", "0, In caller pre-dial handler!") in new stack
    -- Executing [caller_handler@macro-dialout-trunk-predial-hook:5] Return("PJSIP/011-000001de", "") in new stack
  == Spawn extension (macro-dialout-trunk, s, 26) exited non-zero on 'PJSIP/011-000001de'
    -- PJSIP/011-000001de Internal Gosub(macro-dialout-trunk-predial-hook,caller_handler,1) complete GOSUB_RETVAL=
    -- PJSIP/74212556430-000001df Internal Gosub(func-apply-sipheaders,s,1(1)) start
    -- Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/74212556430-000001df", "Applying SIP Headers to channel PJSIP/74212556430-000001df") in new stack
    -- Executing [s@func-apply-sipheaders:2] Set("PJSIP/74212556430-000001df", "TECH=PJSIP") in new stack
    -- Executing [s@func-apply-sipheaders:3] Set("PJSIP/74212556430-000001df", "SIPHEADERKEYS=") in new stack
    -- Executing [s@func-apply-sipheaders:4] While("PJSIP/74212556430-000001df", "0") in new stack
    -- Jumping to priority 12
    -- Executing [s@func-apply-sipheaders:13] Return("PJSIP/74212556430-000001df", "") in new stack
  == Spawn extension (from-provider, 89141666889, 1) exited non-zero on 'PJSIP/74212556430-000001df'
    -- PJSIP/74212556430-000001df Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
    -- Called PJSIP/19089141666889@74212556430
       > 0x7f5d642f05f0 -- Strict RTP learning after remote address set to: 193.233.5.254:10164
    -- PJSIP/74212556430-000001df is making progress passing it to PJSIP/011-000001de
       > 0x7f5d64415e50 -- Strict RTP learning after remote address set to: 212.19.6.166:10038
       > 0x7f5d642f05f0 -- Strict RTP switching to RTP target address 193.233.5.254:10164 as source
       > 0x7f5d64415e50 -- Strict RTP switching to RTP target address 212.19.6.166:10038 as source
    -- PJSIP/74212556430-000001df is ringing
    -- PJSIP/74212556430-000001df answered PJSIP/011-000001de
    -- Channel PJSIP/74212556430-000001df joined 'simple_bridge' basic-bridge <22480c9a-594c-4864-b157-b050ac12c3a4>
    -- Channel PJSIP/011-000001de joined 'simple_bridge' basic-bridge <22480c9a-594c-4864-b157-b050ac12c3a4>
       > 0x7f5d642f05f0 -- Strict RTP learning complete - Locking on source address 193.233.5.254:10164
       > 0x7f5d64415e50 -- Strict RTP learning complete - Locking on source address 212.19.6.166:10038
[2020-03-11 08:35:59] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '#' received on PJSIP/011-000001de
[2020-03-11 08:35:59] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '#' on PJSIP/011-000001de
[2020-03-11 08:35:59] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '#' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:35:59] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '#' on PJSIP/011-000001de
[2020-03-11 08:35:59] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '#' on PJSIP/011-000001de
    -- Started music on hold, class 'default', on channel 'PJSIP/74212556430-000001df'
    -- Executing [s@macro-DTMFo:1] NoOp("PJSIP/011-000001de", "Current DYNAMIC_FEATURES - fax-send#fax-start#DTMFo") in new stack
    -- Executing [s@macro-DTMFo:2] GotoIf("PJSIP/011-000001de", "1?enable-dtmf:disable-dtmf") in new stack
    -- Goto (macro-DTMFo,s,3)
    -- Executing [s@macro-DTMFo:3] Set("PJSIP/011-000001de", "DYNAMIC_FEATURES=ATXFo-0#ATXFo-1#ATXFo-2#ATXFo-3#ATXFo-4#ATXFo-5#ATXFo-6#ATXFo-7#ATXFo-8#ATXFo-9#fax-send#fax-start#DTMFo") in new stack
    -- Executing [s@macro-DTMFo:4] DumpChan("PJSIP/011-000001de", "") in new stack

Dumping Info For Channel: PJSIP/011-000001de:
================================================================================
Info:
Name=               PJSIP/011-000001de
Type=               PJSIP
UniqueID=           1583879748.1196
LinkedID=           1583879748.1196
CallerIDNum=        74212556430
CallerIDName=       (N/A)
ConnectedLineIDNum= 89141666889
ConnectedLineIDName=CID:74212556430
DNIDDigits=         89141666889
RDNIS=              (N/A)
Parkinglot=         
Language=           ru
State=              Up (6)
Rings=              1
NativeFormat=       (alaw)
WriteFormat=        alaw
ReadFormat=         alaw
RawWriteFormat=     alaw
RawReadFormat=      alaw
WriteTranscode=     No
ReadTranscode=      No
1stFileDescriptor=  38
Framesin=           365
Framesout=          364
TimetoHangup=       0
ElapsedTime=        0h0m11s
BridgeID=           22480c9a-594c-4864-b157-b050ac12c3a4
Context=            macro-DTMFo
Extension=          s
Priority=           4
CallGroup=         
PickupGroup=       
Application=        DumpChan
Data=               (Empty)
Blocking_in=        (Not Blocking)

Variables:
MACRO_DEPTH=2
DYNAMIC_FEATURES=ATXFo-0#ATXFo-1#ATXFo-2#ATXFo-3#ATXFo-4#ATXFo-5#ATXFo-6#ATXFo-7#ATXFo-8#ATXFo-9#fax-send#fax-start#DTMFo
MACRO_PRIORITY=26
MACRO_CONTEXT=macro-dialout-trunk
MACRO_EXTEN=s
DYNAMIC_WHO_ACTIVATED=PJSIP/011-000001de
DYNAMIC_FEATURENAME=DTMFo
BRIDGEPVTCALLID=2ca1d963-6c7d-4262-ac95-60c78a7318ef
BRIDGEPEER=PJSIP/74212556430-000001df
DIALEDPEERNUMBER=19089141666889@74212556430
DIALEDPEERNAME=PJSIP/74212556430-000001df
DIALSTATUS=ANSWER
GOSUB_RETVAL=
DIALEDTIME=
ANSWEREDTIME=
DB_RESULT=Test2
ARG1=1
ODBCROWS=-1
QNUM_OUT=9141666889
DIAL_TRUNK_OPTIONS=TB(macro-dialout-trunk-predial-hook^caller_handler^1)
custom=PJSIP
OUTNUM=19089141666889
DIAL_NUMBER=19089141666889
TARGET_FLP_1=19089141666889
TIOHIDE=no
TRUNKOUTCID=74212556430
EMERGENCYCID=
USEROUTCID=
ALLOWTHISROUTE=NO
HOTDESKCALL=0
HOTDESKEXTEN=011
HOTDESCKCHAN=011-000001de
OUTBOUND_GROUP=OUT_1
DIAL_TRUNK=1
ARG4=off
ARG3=
ARG2=89141666889
NODEST=
MOHCLASS=default
REC_STATUS=RECORDING
RECORD_ID=PJSIP/011-000001de
MIXMON_ID=0x7f5cd4572b10
LOCAL_MIXMON_ID=0x7f5cd4572b10
MIXMONITOR_FILENAME=/var/spool/asterisk/monitor/2020/03/11/out-89141666889-011-20200311-083548-1583879748.1196.wav
CALLFILENAME=out-89141666889-011-20200311-083548-1583879748.1196
REC_POLICY_MODE=FORCE
RECMODE=force
REC_POLICY_MODE_SAVE=
MON_FMT=wav
FROMEXTEN=011
TIMESTR=20200311-083548
YEAR=2020
MONTH=03
DAY=11
NOW=1583879748
DIAL_OPTIONS=HhTtr
AMPUSERCID=011
AMPUSERCIDNAME=Test2
AMPUSER=011
REALCALLERIDNUM=011
TOUCH_MONITOR=1583879748.1196
================================================================================
    -- Executing [s@macro-DTMFo:5] NoOp("PJSIP/011-000001de", "New DYNAMIC_FEATURES - ATXFo-0#ATXFo-1#ATXFo-2#ATXFo-3#ATXFo-4#ATXFo-5#ATXFo-6#ATXFo-7#ATXFo-8#ATXFo-9#fax-send#fax-start#DTMFo") in new stack
    -- Executing [s@macro-DTMFo:6] MacroExit("PJSIP/011-000001de", "") in new stack
    -- Stopped music on hold on PJSIP/74212556430-000001df
ccnew-idle*CLI>
ccnew-idle*CLI>
ccnew-idle*CLI>
ccnew-idle*CLI>
[2020-03-11 08:36:04] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '0' received on PJSIP/011-000001de
[2020-03-11 08:36:04] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '0' on PJSIP/011-000001de
[2020-03-11 08:36:04] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '0' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:04] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '0' on PJSIP/011-000001de
[2020-03-11 08:36:04] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '0' on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '1' received on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '1' on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '1' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '1' on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '1' on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '4' received on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '4' on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '4' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '4' on PJSIP/011-000001de
[2020-03-11 08:36:05] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '4' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '5' received on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '5' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '5' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '5' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '5' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '2' received on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '2' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '2' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '2' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '2' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '4' received on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '4' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '4' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '4' on PJSIP/011-000001de
[2020-03-11 08:36:06] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '4' on PJSIP/011-000001de
[2020-03-11 08:36:07] DTMF[21388][C-000000b7]: channel.c:4124 __ast_read: DTMF begin '1' received on PJSIP/011-000001de
[2020-03-11 08:36:07] DTMF[21388][C-000000b7]: channel.c:4135 __ast_read: DTMF begin passthrough '1' on PJSIP/011-000001de
[2020-03-11 08:36:07] DTMF[21388][C-000000b7]: channel.c:4038 __ast_read: DTMF end '1' received on PJSIP/011-000001de, duration 110 ms
[2020-03-11 08:36:07] DTMF[21388][C-000000b7]: channel.c:4079 __ast_read: DTMF end accepted with begin '1' on PJSIP/011-000001de
[2020-03-11 08:36:07] DTMF[21388][C-000000b7]: channel.c:4108 __ast_read: DTMF end passthrough '1' on PJSIP/011-000001de
    -- Channel PJSIP/74212556430-000001df left 'simple_bridge' basic-bridge <22480c9a-594c-4864-b157-b050ac12c3a4>
    -- Channel PJSIP/011-000001de left 'simple_bridge' basic-bridge <22480c9a-594c-4864-b157-b050ac12c3a4>
  == Spawn extension (macro-dialout-trunk, s, 26) exited non-zero on 'PJSIP/011-000001de' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 89141666889, 6) exited non-zero on 'PJSIP/011-000001de'
    -- Executing [h@from-internal:1] Macro("PJSIP/011-000001de", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] NoOp("PJSIP/011-000001de", "Call-center www.avantelecom.ru") in new stack
    -- Executing [s@macro-hangupcall:2] ExecIf("PJSIP/011-000001de", "0?GoSub(agent-direct,h,1)") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("PJSIP/011-000001de", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,5)
    -- Executing [s@macro-hangupcall:5] ExecIf("PJSIP/011-000001de", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:6] Hangup("PJSIP/011-000001de", "") in new stack
  == Spawn extension (macro-hangupcall, s, 6) exited non-zero on 'PJSIP/011-000001de' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/011-000001de'
    -- PJSIP/011-000001de Internal Gosub(hangup-handler-out,s,1)) start
    -- Executing [s@hangup-handler-out:1] NoOp("PJSIP/011-000001de", "qabandon:"" BRIDGEPEER:"" DIALSTATUS:"ANSWER" num_in_autodialer:""") in new stack
    -- Executing [s@hangup-handler-out:2] Set("PJSIP/011-000001de", "BRIDGEPEER=89141666889") in new stack
    -- Executing [s@hangup-handler-out:3] ExecIf("PJSIP/011-000001de", "0?Set(BRIDGEPEER=)") in new stack
    -- Executing [s@hangup-handler-out:4] Macro("PJSIP/011-000001de", "bx24avan-hangup,") in new stack
    -- Executing [s@macro-bx24avan-hangup:1] GotoIf("PJSIP/011-000001de", "1?skipbitrix") in new stack
    -- Goto (macro-bx24avan-hangup,s,10)
    -- Executing [s@macro-bx24avan-hangup:10] NoOp("PJSIP/011-000001de", "") in new stack
    -- Executing [s@hangup-handler-out:5] GotoIf("PJSIP/011-000001de", "0?next_check") in new stack
    -- Executing [s@hangup-handler-out:6] GotoIf("PJSIP/011-000001de", "0?next_check") in new stack
    -- Executing [s@hangup-handler-out:7] Return("PJSIP/011-000001de", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/011-000001de'
    -- PJSIP/011-000001de Internal Gosub(hangup-handler-out,s,1)) complete GOSUB_RETVAL=
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording PJSIP/011-000001de

If you are referring to changing it while the channel is in the bridge with a call, that is not supported. The value is read when the channel enters the bridge, instead of continuously, and features listened to based on that.

2 Likes

Thanks!

Why did it work in asterisk 11?

The code was fundamentally different. Without digging in and investigation I can’t really answer with any detail.

I understood. Thanks for the answer.

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