[SR-Users] How to add some text at end of body line with subst_body

Barthel Marco (CI/AFU1) Marco.Barthel at de.bosch.com
Tue Feb 25 17:37:55 CET 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140225/8874cf70/attachment.html>


More information about the sr-users mailing list