[asterisk-dev] [Code Review] AST-33: Create a list of channel variables to be posted within AMI call events
Stefan Reuter
stefan.reuter at reucon.com
Sat Sep 26 07:22:45 CDT 2009
Tilghman Lesher wrote:
>>>>>> Channel1Var-SV_OWNER: a1101
>>>>>> Channel1Var-SV_PEER: a1116
>>>>>> Channel1Var-DISPLAY_URL:
>>>> And in chan_sip we have
>>>>
>>>> astman_append(s, "ChanVariable: %s=%s\r\n", v->name, v->value);
>> I don't understand you. It's a manager header that we use to display
>> channel variables.
>> We have a policy of not adding new headers if we already have one we
>> use.
>
> Also, I'm pretty sure the Java implementation guys would prefer that we
> make each header within an event completely unique, otherwise it breaks
> their implementation.
As one of the Java implementation guys I can add:
The syntax
Variable: var1=val1
Variable: var2=val2
is already supported in Asterisk-Java and works fine. In Asterisk-Java
this translates to a Map called "variable" which contains
var1 -> val1
var2 -> val2
So a syntax like
Channel1Var: SV_OWNER=a1101
Channel1Var: SV_PEER=a1116
Channel1Var: DISPLAY_URL=
Channel2Var: SV_OWNER=xyz
would work pretty well for us.
The alternative Channel1Var-SV_OWNER would be less pleasant as we would
need explicit knowledge that the prefix Channel1Var has to be treated
special.
=Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20090926/8c3f3fff/attachment-0001.pgp
More information about the asterisk-dev
mailing list