[asterisk-dev] [Code Review] AST-33: Create a list of channel variables to be posted within AMI call events

Olle E. Johansson oej at edvina.net
Sun Sep 27 04:01:14 CDT 2009


27 sep 2009 kl. 06.01 skrev Tilghman Lesher:

> On Saturday 26 September 2009 07:22:45 Stefan Reuter wrote:
>> 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.
>
> I'm fine with that.  OEJ?
>
Which is more or less what I suggested above. I don't see why we  
should change "ChanVariable" that we already use to ChannelVar that we  
do not use. That would be against the current recommendations for new  
AMI headers...

/O



More information about the asterisk-dev mailing list