Thanks very much Alex. <div>You are right. In general kamailio does not offer much functionality of a general purpose language. </div><div>The other option for the task that I found was "s.rm" transformation. Although it works the other way :) you need to match what needs to be removed :)</div>
<div><br></div><div>Now a general question ( or request for a word of advice :) ): if you have ultimate flexibility and want to send an integer from one proxy to another. What functions ( modules ) are the best to append and recover it? ( i don't care where it is appended, body or header, etc )<span></span><br>
<br>On Thursday, August 14, 2014, Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 08/14/2014 02:59 PM, AliReza Khoshgoftar Monfared wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi list,<br>
<br>
How can I extract a specific part of my message body?<br>
I know that "textops" has the function "search_body(re)" but it returns<br>
True/False upon finding "re" in the body of the text, how can I return<br>
the actual text that regular expression matches?<br>
<br>
As an example, my message body is<br>
<br>
    rate is 172#012<br>
<br>
<br>
I want to extract the number "172" out of this.<br>
</blockquote>
<br>
There is no general means of accomplishing that. Your best bet is to feed the message body to another language using one of the language interface modules, such as Lua, Perl or Python, and parse stuff out of it there.<br>

<br>
For all of its features, Kamailio route script is not a general-purpose programming runtime.<br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
Tel: +1-678-954-0670<br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/" target="_blank">http://www.alexbalashov.com/</a><br>
<br>
Please be kind to the English language:<br>
<br>
<a href="http://www.entrepreneur.com/article/232906" target="_blank">http://www.entrepreneur.com/<u></u>article/232906</a><br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a>sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</blockquote></div>