Hi Carsten,
Thanks for your reply!
How can I call msg_apply_changes() in right way? If I call msg_apply_changes() for example in route[RELAY] i get error: ERROR: textopsx [textopsx.c:157]: msg_apply_changes_f(): invalid usage - not in request route
if I do everything as you suggested in onreply_route (after I get for example SIP 500 message) it doesn't work and my SDP remains unchanged.
Thanks!
*From: *Carsten Bock carsten@ng-voice.com *Subject: **Re: [SR-Users] rtpengine rewrite sdp for second time* *Date: *17 Aug 2015 09:49:12 EEST *To: *"Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org
*Reply-To: *"Kamailio (SER) - Users Mailing List" < sr-users@lists.sip-router.org>
Hi Virmantas,
you could try to one or a combination of the following:
- explicitly delete the first session by calling rtpengine_manage() in
the failure route
- call msg_apply_changes() from Textops before calling
rtpengine_manage() the second time (so the already made changes are applied and the message gets reparsed)
Thanks, Carsten
2015-08-16 20:13 GMT+02:00 Virmantas Variakojis virmantas.variakojis@gmail.com:
Hi,
I have a situation like this: I have kamailio with 3 NIC's. I'm sending INVITE to first provider over NIC1. Before sending INVITE I use rtpengine_manage to rewrite sdp body with IP that is on NIC1: rtpengine_manage ("replace-origin replace-session-connection direction=intvlan direction=prov1 ICE=remove");
If first provider fails i want to send INVITE for the same call to second provider. But if i use like this: rtpengine_manage ("replace-origin replace-session-connection direction=intvlan direction=prov2 ICE=remove"); or (because ip of prov1 is allready set): rtpengine_manage ("replace-origin replace-session-connection direction=prov1 direction=prov2 ICE=remove"); rtpengine ignores my changes as said in documentation: "The direction must only be specified in for initial SDP offer; answers or subsequent offers can omit this option."
and if I try to set ip like this: rtpengine_manage ("replace-origin replace-session-connection media-address=X.X.X.X ICE=remove"); SDP body is doubled: it leaves old values and adds the new one.
What i'm doing wrong or how can I rewrite SDP for second time? Thanks in advance for answer!
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
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
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