Hi Antonis,
even simpler, you can have a single branch route and from the request
route or failure route just to set different values for the
$vp(rtpflags), to reflect the bridging rtpengine has to do.
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
https://opensips.org/training/OpenSIPS_eBootcamp_2021/
On 10/6/21 11:08 AM, Antonis Psaras wrote:
Hello Bogdan
Thank you very much for the reply.
So what I am doing now is the following
if(is_method("INVITE") && !has_totag())
{
………
if (has_body("application/sdp"))
{
if (rtpengine_offer("$avp(rtpflags)"))
t_on_reply("REPLY_ANSWER");
}
else
{
t_on_reply("REPLY_OFFER");
}
…..
}
And what you suggest is to do it like that?
if(is_method("INVITE") && !has_totag())
{
………
t_on_branch("1");
…..
}
branch_route[1]
{
….
if (has_body("application/sdp"))
{
if (rtpengine_offer("$avp(rtpflags)"))
t_on_reply("REPLY_ANSWER");
}
else
{
t_on_reply("REPLY_OFFER");
}
…..
}
branch_route[2]
{
….
if (has_body("application/sdp"))
{
if (rtpengine_offer("$avp(rtpflags)"))
t_on_reply("REPLY_ANSWER");
}
else
{
t_on_reply("REPLY_OFFER");
}
…..
}
failure_route[failure]
{
if (t_check_status("(301)|(302)"))
{
get_redirects("1:1");
uac_replace_from("","$tu");
uac_replace_to("","$ru");
if (!ds_select_dst("1", "0"))
{
send_reply("500","Unable to route");
exit;
}
t_on_branch("2");
t_relay();
}
rtpengine_delete();
}
Best regards
*From:* Bogdan-Andrei Iancu <bog...@opensips.org>
*Sent:* Τετάρτη, 6 Οκτωβρίου 2021 10:55
*To:* apsa...@microbase.gr; OpenSIPS users mailling list
<users@lists.opensips.org>
*Subject:* Re: [OpenSIPS-Users] Handling SDP on 302 request with mhome
Hi Antonis,
I guess you should move the enagaing of the rtpengine (for the INVITE
time) in the branch route, so it can do different SDP settings
according to the destination of that branch.
How you do it now will set the SDP in INVITE only in relation to the
first branch (so WAN) and reuse it for the next branches too.
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com <https://www.opensips-solutions.com>
OpenSIPS eBootcamp 2021
https://opensips.org/training/OpenSIPS_eBootcamp_2021/
<https://opensips.org/training/OpenSIPS_eBootcamp_2021/>
On 9/27/21 3:48 AM, Antonis Psaras wrote:
Hello Team
I have an OpenSIPs with multi home (WAN / LAN) connected to an
Asterisk (LAN). The problem I have is the following.
A call is coming from Asterisk to OpenSIPs LAN interface for a
user registered on OpenSIPs. That user has call forwarding enabled
and OpenSIPs receives a 302.
That request is handled as follows
failure_route[failure]
{
if (t_check_status("(301)|(302)"))
{
get_redirects("1:1");
uac_replace_from("","$tu");
uac_replace_to("","$ru");
if (!ds_select_dst("1", "0"))
{
send_reply("500","Unable to route");
exit;
}
t_relay();
}
rtpengine_delete();
}
A new INVITE is generated from OpenSIPs towards Asterisk but SDP
negotiated is the initial (OpenSIPs to Client) with the WAN IP.
Is there a way to correct that?
Thank you in advance for your support.
_______________________________________________
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users