Hello,
On 02/18/06 05:07, Lenir wrote:
Hey guys,
What is the best way to modify the SDP message to always include (if not replace) the a= tags in a SDP message?
My problem is specifically with g729, according to the RFC, if the parameter: “a=fmtp:18 annexb=yes” is present or missing then it is assumed that g729b (g729 with VAD) and if “a=fmtp:18 annexb=no” is present then the devices will use g729a (g729 with VAD Disabled). My problem is that some cisco gateways and ATAs behave differently (of course Cisco always doing it their way), if “a=fmtp:18 annexb=no” is missing then it assumes that g729a will be used, instead of following the RFC where it should negotiate g729b. Also, asterisk doesn’t support g729b so I want to avoid using g729b everywhere in my network.
So what is the best way or is there a way, to either: a) insert “a=fmtp:18 annexb=no” if is not present
b) replace “a=fmtp:18 annexb=yes” for “a=fmtp:18 annexb=no” if it is present
you can use textops module. You have functions to search a string and replace it with another value (replace()). If the line does not exist then you have to use search_append(). It is in roadmap to add specific functions to search/replace only withing the body of the message...
http://openser.org/docs/modules/1.0.x/textops.html
Cheers, Daniel
Thanks in advance!!
Lenir
p.s. Please see the below excerpt from RFC 3555 regarding how to specify G729.
RFC 3555 MIME Type Registration of RTP Payload Formats July 2003
4.1.9. Registration of MIME media type audio/G729
MIME media type name: audio
MIME subtype name: G729
Required parameters: None
Optional parameters:
ptime, maxptime
annexb: indicates that Annex B, voice activity detection, is used or preferred. Permissible values are "yes" and "no" (without the quotes); "yes" is implied if this parameter is omitted
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users