Hello,
maybe you can try to skip \r in the match:
subst_body('/(a=crypto[^ \r]*)/\1 UNENCRYPTED_SRTCP/g');
Cheers,
Daniel
On 25/02/14 17:37, Barthel Marco (CI/AFU1) wrote:
Hi,
I’m trying to add some string at the end of some line in the body/sdp
of a SIP INVITE for testing some interoperability.
The following line
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:NwC8z5MsyCWbpJJo1n2BDS8DkGuUU2cIt9KRUqPU
should be converted to
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:NwC8z5MsyCWbpJJo1n2BDS8DkGuUU2cIt9KRUqPU UNENCRYPTED_SRTCP
I tried with this:
subst_body('/(a=crypto.*)\r/\1 UNENCRYPTED_SRTCP\r/g');
but it does not match
just using
subst_body('/(a=crypto.*)/\1 UNENCRYPTED_SRTCP/g');
matches but results in this (carriage return between key and
“UNENCRYPTED_SRTCP”):
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:NwC8z5MsyCWbpJJo1n2BDS8DkGuUU2cIt9KRUqPU\rUNENCRYPTED_SRTCP
using Kamailio 3.3.6
Any ideas?
Mit freundlichen Grüßen / Best regards
*Marco Barthel
*
Robert Bosch GmbH
(CI/AFU1)
Postfach 30 02 20
70442 Stuttgart
GERMANY
www.bosch.com <http://www.bosch.com>
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr.
Volkmar Denner,
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung,
Dr. Dirk Hoheisel, Christoph Kübel,
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users