[Kamailio-Users] textops usage

Juan Perez jperezsip2008 at yahoo.com
Tue Apr 21 17:07:58 CEST 2009


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");
        }

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?

cheers

jp


      




More information about the Users mailing list