IAX And Variables

Home » Asterisk Users » IAX And Variables
Asterisk Users 2 Comments

Hi

a new small question ;=)

We have two Asterisk, connected in IAX2.

On the first, in dialplan, we have:
exten => _XX.,1,Set(IAXVAR(ACCOUNTID)=${CDR(accountcode)})
we sent into the IAXVAR “ACCOUNTID” the accountcode.

On the second, in dialplan, we have:
exten => 18,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})

That’s work, the second server get the variable.

I want now said at the second server that accountcode ${IAXVAR(ACCOUNTID)}, for use this accoundcode in CDR. On second server, in cdr_mysql.conf i have:

[columns]
alias start => calldate alias end => callend alias clid => clid alias src => src alias dst => dst alias dcontext => dcontext alias channel => channel alias dstchannel => dstchannel alias lastapp => lastapp alias lastdata => lastdata alias duration => duration alias billsec => billsec alias disposition => disposition alias amaflags => amaflags alias accountcode => accountcode alias userfield => userfield alias uniqueid => uniqueid

But where i can put into the config that for this cdr entry accountcode
= ${IAXVAR(ACCOUNTID)} ?

thanks for your help

jerome

2 thoughts on - IAX And Variables

  • Wont this work?

    exten =>
    18,1,Set(CDR(accountcode)=${IAXVAR(ACCOUNTID)})

    accountcode is not read-only property so it should be writeable.

    Phibee Network Operation Center писал 07.10.2013 21:05:

    ;=)
    dialplan, we have:
    _XX.,1,Set(IAXVAR(ACCOUNTID)=${CDR(accountcode)})
    IAXVAR “ACCOUNTID” the accountcode. have:
    That’s work, the second server get the variable. the second server that accountcode > ${IAXVAR(ACCOUNTID)}, this accoundcode in CDR. On second server, in cdr_mysql.conf i have:

    clid => clid dcontext alias lastapp => lastapp
    => duration disposition accountcode uniqueid entry accountcode help