Below is a short config example. route { ... setflag(CallFWD); rtpengine_manage(); #say the first call attempt need rtpengine t_on_failure("handle_failure"); r_relay(); ... }
failure_route[handle_failure] { ... if (isflagset(CallFWD)){route(handle_callfwd);} ... } route[handle_callfwd]{ ... xlog("L_INFO","RB=$rb(application/sdp)"); if (t_relay()){ xlog("L_INFO","Stateful relay done. RB=$rb(application/sdp)"); } ... } Looks like the t_relay in the handle_callfwd will inherit the SDP info that rtpengine_manage entered in the first attempt. Also, another interesting fact is that the SDP info is added while the t_relay is called. Looks like the t_relay is using its data in memory and re-write the SDP. the $rb(application/sdp) is not changed until the t_relay is called. How can I, for example, remove the rtpengine related SDP for the second INVITE generated by the failure_route? I tried rtpengine_delete() in handle_callfwd or rtpengine_manage() in the failure_route which suppose to do rtpengine_delete also, but they don't work as expected. Thanks in advance. -- Regards, William Jin ________________________________ From: Users <users-boun...@lists.opensips.org> on behalf of William Jin <willi...@exetel.com.au> Sent: Tuesday, 9 June 2020 9:09 AM To: OpenSIPS users mailling list <users@lists.opensips.org> Subject: [OpenSIPS-Users] question about rtpengine_manage() in failure_route Hi All May I know how can I rewrite the SDP (rtpengine) in the failure route? The scenario is we use rtpengine_manage() in the first call attempt, if it fails, it uses failure_route, however, we want to change the SDP info. For example, the call's first attempt is to an ipv6 UAC, when failed, we try ipv4 UAC. We need to change the rtpengine address-family to IP4 so the c= line can follow with an IPv4 address. We tried to use rtpengine_manage("address-family=IP4"), but looks like the SDP still not changed. Does anyone have any idea about this? Or is there any other way to achieve this? -- Regards, William Jin
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users