[Home]

Summary:ASTERISK-17584: Wrong return from Dial app in macro when also used CONNECTED_LINE_CALLER_SEND_MACRO macro call
Reporter:Igor Nikolaev (microlana)Labels:
Date Opened:2011-03-21 06:31:29Date Closed:2011-04-19 09:55:47
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:1.8.3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When used CONNECTED_LINE_CALLER_SEND_MACRO and a call is initiated by Dial() app from macro-stdexten, we got an empty DIALSTATUS, MACRO_EXTEN, MACRO_CONTEXT, MACRO_PRIORITY and user-defined channel variables after Dial() app is returned.

At following example we are call from SIP extension 003127 to the SIP extension 003105. When Dial() app is return into stdexten macro, we have an empty DIALSTATUS, MACRO_EXTEN, MACRO_CONTEXT, MACRO_PRIORITY and any user-defined channel variables.


****** ADDITIONAL INFORMATION ******

extensions.conf

[globals]
CONNECTED_LINE_CALLER_SEND_MACRO=line_connected

[macro-line_connected]
exten => s,1,NoOp(Called ORIGINATOR CONNECTED MACRO)
exten => s,n,NoOp(ARG1: ${ARG1})
exten => s,n,NoOp(ARG2: ${ARG2})
exten => s,n,NoOp(ARG3: ${ARG3})
exten => s,n,NoOp(ARG4: ${ARG4})
exten => s,n,GotoIf($["${ARG5}" != "external"]?done)
exten => s,n,NoOp(SERVICE: ${service})
exten => s,n(done),Set(CHANNEL(musicclass)=${customer}0)                                
exten => s,n,MacroExit()


[macro-stdexten]
exten => s,1,Set(dialoptions=${ARG5})                                                    
exten => s,n,Set(dialtimeout=${ARG4})                                                    
exten => s,n,Set(dialdelay=${ARG10})                                                    
exten => s,n,Set(choice=1)                                                              
exten => s,n,GotoIf(${DB_EXISTS(forwarding/${customer}/${ARG1}/always)}?forward_always)
exten => s,n,GotoIf(${VALID_EXTEN(private-dynamic,${customer}${ARG1},${choice})}?valid_extension)
exten => s,n(CONGESTION),Set(MACRO_OFFSET=3)                                            
exten => s,n,MacroExit()                                                                
exten => s,n(valid_extension),Gosub(private-dynamic,${customer}${ARG1},${choice})
exten => s,n,Set(destination=${GOSUB_RETVAL})                                            
exten => s,n(call_destination),GotoIf($["${destination}" == ""]?CONGESTION)
exten => s,n,Set(GROUP()=${customer}${ARG1})                                            
exten => s,n,GotoIf($["${ARG7}" == ""]?unlimited)                    
exten => s,n,GOtoIf($[${GROUP_COUNT(${customer}${ARG1})} <= ${ARG7}]?unlimited)  
exten => s,n(CHANUNAVAIL),Set(MACRO_OFFSET=4)                                            
exten => s,n,MacroExit()                                                                
exten => s,n(unlimited),GotoIf(${ARG8}?transparent)                                      
exten => s,n,GotoIf($["${ARG6}" == ""]?is_recorded)                                  
exten => s,n,Set(__PICKUPMARK=${ARG6})                                                  
exten => s,n(is_recorded),GotoIf($["${ARG9}" == ""]?dial)                                        
exten => s,n,MixMonitor(${CDR(uniqueid)}.wav49,b,${MONITOR_EXEC})                        
exten => s,n,Goto(dial)                                                                  
exten => s,n(transparent),Set(dialoptions=)                                              
exten => s,n(dial),GotoIf($["${dialdelay}" == ""]?do_dial)                                            
exten => s,n,System(/bin/sleep ${dialdelay})                                                            
exten => s,n(do_dial),Dial(${destination},${dialtimeout},${dialoptions}Fg)              
exten => s,n,Set(__PICKUPMARK=)                                                          
exten => s,n,GotoIf($["${ARG9}" == ""]?record_off)                                                    
exten => s,n,StopMixMonitor()                                                            
exten => s,n(record_off),GotoIf($["${DIALSTATUS}" == "ANSWER"]?dial-ANSWER)                        
exten => s,n,NoOp(CHOICE: "${choice}")
exten => s,n,NoOp(DIALSTATUS: "${DIALSTATUS}")
exten => s,n,NoOp(MACRO_EXTEN: "${MACRO_EXTEN}")
exten => s,n,NoOp(MACRO_CONTEXT: "${MACRO_CONTEXT}")
exten => s,n,NoOp(MACRO_PRIORITY: "${MACRO_PRIORITY}")


asterisk.log (verbose level)
Mar 21 12:31:13 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:28] Dial("SIP/003127-00000714", "SIP/003105,15,tTkKFg") in new stack
Mar 21 12:31:13 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: netsock.c:167 in ast_netsock_set_qos:   == Using UDPTL CoS mark 5
Mar 21 12:31:13 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: netsock2.c:499 in ast_set_qos:   == Using SIP RTP CoS mark 5
Mar 21 12:31:13 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: app_dial.c:2178 in dial_exec_full:     -- Called 003105
Mar 21 12:31:14 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: app_dial.c:1216 in wait_for_answer:     -- SIP/003105-00000715 is ringing
Mar 21 12:31:14 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: app_dial.c:1216 in wait_for_answer:     -- SIP/003105-00000715 is ringing
Mar 21 12:31:14 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: app_dial.c:1216 in wait_for_answer:     -- SIP/003105-00000715 is ringing
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:1] NoOp("SIP/003127-00000714", "Called ORIGINATOR CONNECTED MACRO") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:2] NoOp("SIP/003127-00000714", "ARG1: 105") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:3] NoOp("SIP/003127-00000714", "ARG2: ") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:4] NoOp("SIP/003127-00000714", "ARG3: ") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:5] NoOp("SIP/003127-00000714", "ARG4: 15") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:6] GotoIf("SIP/003127-00000714", "1?done") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:9420 in pbx_builtin_goto:     -- Goto (macro-line_connected,s,8)
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:8] Set("SIP/003127-00000714", "CHANNEL(musicclass)=0030") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-line_connected:9] MacroExit("SIP/003127-00000714", "") in new stack
Mar 21 12:31:16 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: app_dial.c:1057 in wait_for_answer:     -- SIP/003105-00000715 answered SIP/003127-00000714
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: app_macro.c:425 in _macro_exec:   == Spawn extension (macro-stdexten, s, 28) exited non-zero on 'SIP/003127-00000714' in macro 'stdexten'
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8585]: pbx.c:4753 in __ast_pbx_run:   == Spawn extension (international, 105, 3) exited non-zero on 'SIP/003127-00000714'
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:29] Set("SIP/003105-00000715", "__PICKUPMARK=") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:30] GotoIf("SIP/003105-00000715", "1?record_off") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:9420 in pbx_builtin_goto:     -- Goto (macro-stdexten,s,32)
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:32] GotoIf("SIP/003105-00000715", "0?dial-ANSWER") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:33] NoOp("SIP/003105-00000715", "CHOICE: """) in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:34] NoOp("SIP/003105-00000715", "DIALSTATUS: """) in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8586]: app_mixmonitor.c:214 in mixmonitor_ds_close_fs:   == MixMonitor close filestream
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8586]: app_mixmonitor.c:356 in mixmonitor_thread:   == Executing [/var/lib/asterisk/agi-bin/import-mix-audio-into-cdr /var/spool/asterisk/monitor/1300699873.4502.wav49]
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:35] NoOp("SIP/003105-00000715", "MACRO_EXTEN: """) in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:36] NoOp("SIP/003105-00000715", "MACRO_CONTEXT: """) in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:37] NoOp("SIP/003105-00000715", "MACRO_PRIORITY: """) in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: WARNING[8587]: func_math.c:260 in math: '' is not a valid number
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:38] GotoIf("SIP/003105-00000715", "?") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: WARNING[8587]: func_math.c:260 in math: '' is not a valid number
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:39] Set("SIP/003105-00000715", "choice=") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:40] GotoIf("SIP/003105-00000715", "0?valid_extension") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4075 in pbx_extension_helper:     -- Executing [s@macro-stdexten:41] Goto("SIP/003105-00000715", "dial-") in new stack
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: NOTICE[8587]: pbx.c:4119 in pbx_extension_helper: No such label 'dial-' in extension 's' in context 'macro-stdexten'
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: WARNING[8587]: pbx.c:10174 in pbx_parseable_goto: Priority 'dial-' must be a number > 0, or valid label
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8587]: pbx.c:4753 in __ast_pbx_run:   == Spawn extension (macro-stdexten, s, 41) exited non-zero on 'SIP/003105-00000715'
Mar 21 12:31:21 asterisk-customer-0 asterisk[8588]: *** import-mix-audio-into-cdr -- Begin ***
Mar 21 12:31:21 asterisk-customer-0 asterisk[8588]: *** import-mix-audio-into-cdr -- Done *** (Affected rows: 1)
Mar 21 12:31:21 asterisk-customer-0 asterisk[14489]: VERBOSE[8586]: app_mixmonitor.c:360 in mixmonitor_thread:   == End MixMonitor Recording SIP/003127-00000714
Comments:By: Leif Madsen (lmadsen) 2011-04-01 13:39:56

I think I'm going to need more information. It looks like there are two separate channels going on here, and the first channel isn't quite completing, or some information is missing.

Also please provide the dialplan output prior to entering at macro-stdexten line 28 because it would be useful to see what is being passed to the macro.

Please attach the output as a text file to this issue.

By: Leif Madsen (lmadsen) 2011-04-19 09:55:47

No response from reporter.