[Home]

Summary:ASTERISK-14554: CDR(dest) records as s when using ael Macros
Reporter:Darren Philips (dazza76)Labels:
Date Opened:2009-07-29 00:58:57Date Closed:2011-06-07 14:08:10
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_ael
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I have noticed in 1.6.1 the way the system calls macros created in ael screws with the cdr destination.

Please see my examples below.

As the Macro is called as a context it looses all the ${EXTEN} data and ruins the CDR.

I have checked both 1.6.1.1 and 1.6.1.r209327M

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

1.4.1
##########################################
   -- Executing [0406000000@default:1] Verbose("SIP/201-00761ac0", "0|----EXT:0406000000----Cid:201----") in new stack
----EXT:0406000000----Cid:201----
   -- Executing [0406000000@default:2] Macro("SIP/201-00761ac0", "DDial|SIP/Kings/0406000000") in new stack
   -- Executing [s@macro-DDial:1] Set("SIP/201-00761ac0", "command=SIP/Kings/0406000000") in new stack
   -- Executing [s@macro-DDial:2] Dial("SIP/201-00761ac0", "SIP/Kings/0406000000") in new stack
   -- Called Kings/0406000000
   -- Call on SIP/Kings-0075f900 left from hold
   -- SIP/Kings-0075f900 is making progress passing it to SIP/201-00761ac0
 == Spawn extension (macro-DDial, s, 2) exited non-zero on 'SIP/201-00761ac0' in macro 'DDial'
 == Spawn extension (macro-DDial, s, 2) exited non-zero on 'SIP/201-00761ac0'

############################################
1.6.1

 == Using SIP RTP CoS mark 5
   -- Executing [0406000000@default:1] Verbose("SIP/201-006b3398", "0,----EXT:0406000000----Cid:201----") in new stack
----EXT:0406000000----Cid:201----
   -- Executing [0406000000@default:2] Gosub("SIP/201-006b3398", "DDial,s,1(0406000000)") in new stack
   -- Executing [s@DDial:1] Set("SIP/201-006b3398", "LOCAL(command)=0406000000") in new stack
   -- Executing [s@DDial:2] Dial("SIP/201-006b3398", "SIP/Kings/0406000000") in new stack
 == Using SIP RTP CoS mark 5
   -- Called Kings/0406000000
 == Spawn extension (DDial, s, 2) exited non-zero on 'SIP/201-006b3398'


#######################################
Example Dial plan
#######################################

context default {

_x. => {
&DDial(${EXTEN});
}
};

macro DDial(command) {
   Dial(SIP/Carrier/${command});
}



Comments:By: Darren Philips (dazza76) 2009-07-29 01:01:16

This Looks related to 0015214

The issue is Gosub and Macro produce different results in the Cdr
as the New Macros in Ael set the Dst Field to S instead of the Dialing extension

Possible solution would be for macros to be called as _x. and not s

my only way around is to convert to the old format and ignore the new warnings about using the Macro Command

I am open to other workarounds

Cheers
D



By: Leif Madsen (lmadsen) 2009-09-14 12:12:38

Actually, this is a difference in the way Macro's and GoSub's work fundamentally. This isn't really an AEL specific issue.

You'd get the same result in the CDR by doing a Goto(), so the same rules apply there.

I'm closing this as this is not a bug, but a change of behaviour, which is allowed between major versions.