Hi, Aron!
This might fix your use case and drop/reject the request. However,
others might one to continue the processing and send it further - the
challenge here is to make the behavior more flexible, ideally trigger a
route in the script that can be used to decide what to do next - for
example choose a new RTPProxy/RTPengine set, decline the request, or
engage a different engine.
Also, to be consistent, what shall be done with the replies, in case the
server does not respond, or responds with an error?
These are the question I currently have in mind, and I would like to
brainstorm their solutions.
Best regards,
Razvan
On 10/2/24 4:12 AM, Podrigal, Aron wrote:
I was thinking of maybe implementing a way that a callback in
function can set a flag
msg->msg_flags |= FL_TM_CB_ERROR;
// t_fwd.c
/* run the specific callbacks for this transaction */
run_trans_callbacks( TMCB_REQUEST_FWDED, t, request,0,
-request->REQ_METHOD);
_tm_branch_index =0;
if (request->msg_flags & FL_TM_CB_ERROR) {
return -1;
}
// t_reply.c
if (has_tran_tmcbs(t,TMCB_RESPONSE_FWDED) ) {
run_trans_callbacks( TMCB_RESPONSE_FWDED, t, t->uas.request,
relayed_msg, msg_status );
}
if (relayed_msg->msg_flags & FL_TM_CB_ERROR) {
goto error02;
}
On Tue, Oct 1, 2024 at 3:47 AM Răzvan Crainea <[email protected]
<mailto:[email protected]>> wrote:
Hi, Aron!
As Bogdan intuited, there is no way of rejecting the relay if RTPEngine
did not succeed. Please open a ticket on this, so we can do some
brainstorming the best way to tackle this.
Best regards,
Răzvan
On 9/23/24 9:41 AM, Bogdan-Andrei Iancu wrote:
> Hi Aron,
>
> AFAIK, no, but I will let Razvan to update here next week - he knows
> better. Again, small chances to be able to stop (as everything is
done
> via callbacks), but maybe to brain storm for some ideas.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
<https://www.opensips-solutions.com>
> https://www.siphub.com <https://www.siphub.com>
>
> On 18.09.2024 04:21, Podrigal, Aron wrote:
>> Hi All,
>>
>> I am trying to use rtp_relay_engage(). However, what happens
when / if
>> there was a failure, since the internal method being used is by
>> hooking into TM with a callback on TMCB_REQUEST_FWDED, even
though the
>> offer / rtpengine was down, the message is being relayed with the
>> initial SDP.
>>
>> Is there a way to stop / cancel the relay if there was an error?
>>
>> --
>>
>> -
>> Aron Podrigal
>>
>>
>> _______________________________________________
>> Users mailing list
>> [email protected] <mailto:[email protected]>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>
>
> _______________________________________________
> Users mailing list
> [email protected] <mailto:[email protected]>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com>
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
--
-
Aron Podrigal
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users