Daniel, just a quick Q.<br><br>When you replace something on the Body using these module&#39;s functions, the Content-Length value is recalculated?<br><br>Thanks,<br>Uriel<br><br><div class="gmail_quote">On Thu, Apr 23, 2009 at 12:58 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
<br>
On 04/23/2009 03:05 PM, Juan Perez wrote:<br>
&gt; actually I found out what the prob was, the call was not taking the route where that piece of code is and that is why it was not replacing the character.<br>
&gt; I fixed it and it works perfect.<br>
&gt;<br>
</div>ok, sounded very strange from first place, for a function that is pretty<br>
old and quite used. Thanks for reporting back.<br>
<br>
Cheers,<br>
<font color="#888888">Daniel<br>
</font><div><div></div><div class="h5"><br>
&gt; thank you all<br>
&gt; jp<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message ----<br>
&gt; From: Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;<br>
&gt; To: Juan Perez &lt;<a href="mailto:jperezsip2008@yahoo.com">jperezsip2008@yahoo.com</a>&gt;<br>
&gt; Cc: kamailio &lt;<a href="mailto:users@lists.kamailio.org">users@lists.kamailio.org</a>&gt;<br>
&gt; Sent: Thursday, April 23, 2009 4:23:40 AM<br>
&gt; Subject: Re: [Kamailio-Users] textops usage<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; On 04/21/2009 05:07 PM, Juan Perez wrote:<br>
&gt;<br>
&gt;&gt; Hello<br>
&gt;&gt;<br>
&gt;&gt; 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.<br>
&gt;&gt;<br>
&gt;&gt; The calling party [linksys pa2p] apparently does not like the &quot;1&quot; and terminates the call.<br>
&gt;&gt;<br>
&gt;&gt; I want to strip it using textops module and pass back the SDP w/o the &quot;1&quot; and do this in the On_Reply and the Route sections:<br>
&gt;&gt;<br>
&gt;&gt;         if (search_body(&quot;g729/8000/1&quot;)) {<br>
&gt;&gt;          xlog(&quot;L_INFO&quot;,&quot;mylog: On Reply 1 section. Found the string.\n&quot;);<br>
&gt;&gt;         replace_body(&quot;g729/8000/1&quot;,&quot;g729/8000&quot;);<br>
&gt;&gt;         }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; just as note, you can do just replace_body(), now you do two times search.<br>
&gt;<br>
&gt;<br>
&gt;&gt; but it can not even find it. Is leaving me with several questions:<br>
&gt;&gt; 1- is the &quot;re&quot; that I am using right?<br>
&gt;&gt; 2- Do I have to escape the &quot;/&quot;?<br>
&gt;&gt; 3- does the replace and search function go &quot;deep&quot; enough in the SDP?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; I had not time to test your snippet and see what is wrong, try with<br>
&gt; other flavors from textops:<br>
&gt; replace_body_all() or subst_body().<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Daniel<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
--<br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a><br>
<br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>