[Kamailio-Users] get sdp audio port in a script variable

antonroman anton.roman at quobis.com
Fri Apr 17 09:03:43 CEST 2009


Thanks Daniel, 
 
>On 04/15/2009 06:01 PM, antonroman wrote:
>> Hi all,
>>
>> I need to get the INVITE sdp audio port in a script variable to be used
>> in
>> an external command.
>> Is this possible without modifying the source code? I think it can't be
>> done
>> with the TEXTOP module, can be?
>>   
>yes, you can use re.subst transformation to get it:
>http://www.kamailio.org/dokuwiki/doku.php/transformations:1.5.x#re.subst_expression

I managed to extract the port value. First I had to remove all cr and nl
characters from the original content of $rb by using the re.subst
transformation as many times as lines there are in the sdp, I don't know if
this can be done in a smarter way with the existing transformations, anyway,
it works. 

Regards,
Antón

-- 
View this message in context: http://www.nabble.com/get-sdp-audio-port-in-a-script-variable-tp23061909p23092186.html
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.




More information about the Users mailing list