[asterisk-dev] 'IAX2 call variable passing between servers '
Kevin P. Fleming
kpfleming at digium.com
Thu Aug 3 11:02:55 MST 2006
----- Douglas Garstang <dgarstang at oneeighty.com> wrote:
> When the IAX2 soft phone makes a call, I can grab the dial plan
> variable ${ACCOUNTCODE} before the call is terminated, and before
> Asterisk writes the CDR. Obviously, Asterisk is associating the IAX2
> user from iax.conf with their account code variable, and making it
> available in the dial plan for this call.
Exactly correct, as I posted in my last message. The CDR structure is created in memory when the channel is created, and the accountcode field in the CDR is populated.
> I'm trying to understand why the accountcode is accessible for this
> call from an IAX2 client to Asterisk, but apparently not accessible
> when the call is between one Asterisk system and another via IAX2.
Because it not passed over IAX2, ever, even in this softphone situation. They are completely different situations.
If the Asterisk server receiving the call from the other server has 'accountcode' set in the type=user entry for the server sending the call, then that value will be in CDR(ACCOUNTCODE) on the receiving server. The value that was in CDR(ACCOUNTCODE) on the sending server is never transferred and will not be visible on the receiving server.
--
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.
More information about the asterisk-dev
mailing list