i have tried various textops functions to replace sdp c lines with
c=IN IP4 0.0.0.0
but so far all have appended the above line to the end of sdp rather than replaced existing c lines.
any hints on a solution?
-- juha
I've done similar things before by using a reg-ex substitution on the message body.
I think I used replace_body_re() from textops.
Regards,
Peter
On 17 October 2013 08:06, Juha Heinanen jh@tutpro.com wrote:
i have tried various textops functions to replace sdp c lines with
c=IN IP4 0.0.0.0
but so far all have appended the above line to the end of sdp rather than replaced existing c lines.
any hints on a solution?
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I may have used replace_body_all() or replace_body_atonce() as well.
On 17 October 2013 09:27, Peter Dunkley peter.dunkley@crocodilertc.netwrote:
I've done similar things before by using a reg-ex substitution on the message body.
I think I used replace_body_re() from textops.
Regards,
Peter
On 17 October 2013 08:06, Juha Heinanen jh@tutpro.com wrote:
i have tried various textops functions to replace sdp c lines with
c=IN IP4 0.0.0.0
but so far all have appended the above line to the end of sdp rather than replaced existing c lines.
any hints on a solution?
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Peter Dunkley Technical Director Crocodile RCS Ltd
Peter Dunkley writes:
I think I used replace_body_re() from textops.
peter,
replace_body_re() does not exist, but replace_body(re,txt) does.
i made a test call:
replace_body("c=IN IP4", "c=IN IP5");
and result was that original c=IN IP4 ... line is still in outgoing request, but a new line
c=IN IP5
is added as the last line to the sdp.
very weird. perhaps a bug in the function?
-- juha
I was using one of these functions on SDP with Git master around 3 or 4 months ago.
I can't remember exactly what I did as fixes to the equipment I was connected to allowed me to take out the "hack", but it worked at that point.
Regards,
Peter
On 17 October 2013 09:53, Juha Heinanen jh@tutpro.com wrote:
Peter Dunkley writes:
I think I used replace_body_re() from textops.
peter,
replace_body_re() does not exist, but replace_body(re,txt) does.
i made a test call:
replace_body("c=IN IP4", "c=IN IP5");
and result was that original c=IN IP4 ... line is still in outgoing request, but a new line
c=IN IP5
is added as the last line to the sdp.
very weird. perhaps a bug in the function?
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Juha Heinanen writes:
replace_body_re() does not exist, but replace_body(re,txt) does.
i made a test call:
replace_body("c=IN IP4", "c=IN IP5");
and result was that original c=IN IP4 ... line is still in outgoing request, but a new line
c=IN IP5
is added as the last line to the sdp.
same result with
replace_body_all("c=IN IP4", "c=IN IP5");
and
replace_body_atonce("c=IN IP4", "c=IN IP5");
what is it that i'm missing? it is hard to believe that all replace functions are buggy.
-- juha
Hello,
are you using any of the rtpproxy functions as well?
Cheers, Daniel
On 10/17/13 11:20 AM, Juha Heinanen wrote:
Juha Heinanen writes:
replace_body_re() does not exist, but replace_body(re,txt) does.
i made a test call:
replace_body("c=IN IP4", "c=IN IP5");
and result was that original c=IN IP4 ... line is still in outgoing request, but a new line
c=IN IP5
is added as the last line to the sdp.
same result with
replace_body_all("c=IN IP4", "c=IN IP5");
and
replace_body_atonce("c=IN IP4", "c=IN IP5");
what is it that i'm missing? it is hard to believe that all replace functions are buggy.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
just to complete this thread, i had to call msg_apply_changes() after calling replace_body_all(), which replaced ip addresses on c lines with 0.0.0.0. thanks to daniel for the hint.
-- juha