Hello,
On 04/21/2009 05:07 PM, Juan Perez wrote:
Hello
I am receiving the SDP from a provider with this format: g729/8000/1, which I interpret as codec g729, sampling rate 8000 and the number of channels is 1.
The calling party [linksys pa2p] apparently does not like the "1" and terminates the call.
I want to strip it using textops module and pass back the SDP w/o the "1" and do this in the On_Reply and the Route sections:
if (search_body("g729/8000/1")) { xlog("L_INFO","mylog: On Reply 1 section. Found the string.\n"); replace_body("g729/8000/1","g729/8000"); }
just as note, you can do just replace_body(), now you do two times search.
but it can not even find it. Is leaving me with several questions: 1- is the "re" that I am using right? 2- Do I have to escape the "/"? 3- does the replace and search function go "deep" enough in the SDP?
I had not time to test your snippet and see what is wrong, try with other flavors from textops: replace_body_all() or subst_body().
Cheers, Daniel