[Asterisk-Users] CDR problem with macros

Olle E. Johansson oej at edvina.net
Sat Jan 17 02:08:17 MST 2004


Philipp von Klitzing wrote:

> Hi there,
> 
> whenever I use a macro to dial out I see only "s" recorded in the dst 
> field of the CDR. Is there anyway to get around that problem except for 
> not using a macro?
> 
> Example:
> )
> 
> 
Try to match every extension before dialing out instead, using "s" is a bad thing for CDRs.

 > [default]
 > exten => 1234,1,macro(dial-out)
 > [macro-dial-out]
 > exten => s,1,Dial(SIP/test,30,r)

[default]
exten => 1234,1,macro(dial-out,${EXTEN})

[macro-dial-out]
exten => s,1,goto(dial-out2,${ARGV1})

[dial-out2]
exten => _X.,1,Dial(SIP/test,30,r)


Of course, you could to a goto instead of macro in the first place, but there might be
another reason that you want to use a macro...

Now, the last extension used is "1234" instead of "s".
/O




More information about the asterisk-users mailing list