Hi every body,
I am doing a radius authentication & routing using portaone perl scripts in Asterisk 1.4.21.2. I have modified the script so that it sets some globally inherited variables for the incoming call (channel). That part sounds like below.
then in extensions.conf I have this:
exten => _X.,n,agi,agi-rad-auth.pl|AuthorizeBy=Account&Password=SecReT
exten => _X.,n,Set(CDR(userfield)=${CDR(userfield)}something)
exten => _X.,n,Dial(${LEGDIAL1},60)
exten => _X.,n,Hangup
Without having to define the ITSP in sip.conf, Dial to ITSP is finely done and call gets connected. As I expected, 2 CDR events were generated in manager API. The CDR belonging to first incoming call contains userfield but the second CDR does not.
Now my problem is that I need to set CDR(userfield) for the second call dialed using Dial command. I need to set this value for billing purposes. But how?
It would be appreciated if you share your experiments with me.
Thanks.
Sam