Thank you all for the answer.
I made the following changes .
Rtpengine config
port-min = 5000 port-max = 50000
delete-delay = 5
timeout = 10 silent-timeout = 900
the question is
num-threads =
route[relay] {
# for INVITEs enable some additional helper routes
route(handle_media);
t_relay();
exit;
}
route[handle_media] {
if(!is_method("INVITE|UPDATE|BYE|CANCEL"))
return;
# BYE rtpengine_delete()
if (is_method("BYE|CANCEL")) {
xlog("LOOSE_ROUTE:DBG: [$rm] trying
delete rtpengine\n");
rtpengine_delete("to-tag");
xlog("Average MOS of the entire call is
$rtpstat(MOS-average)\r\n");
xlog("Average MOS of caller is
$(rtpstat(MOS-average)[$ft])\r\n");
xlog("Average MOS of callee is
$(rtpstat(MOS-average)[$tt])\r\n");
xlog("Min MOS of caller is
$(rtpstat(MOS-min)[$ft]) reported at
$(rtpstat(MOS-min-at)[$ft])\r\n");
}
if(is_method("INVITE|UPDATE")
&& has_body("application/sdp")) {
xlog("[$rm] Call going from WAN SouceIP
<$si> to LAN.\n");
rtpengine_offer("RTP/AVP
replace-session-connection replace-origin ICE=remove");
# Reset session timer for voicemail redirec
$T_fr_inv_timeout = 55;
t_on_reply("handle_media_reply");
}
if(is_method("ACK") &&
has_body("application/sdp")) {
rtpengine_offer("RTP/AVP
replace-session-connection replace-origin ICE=remove");
}
}
onreply_route[handle_media_reply] {
xlog("incoming reply\n");
if(is_method("INVITE|UPDATE") &&
t_check_status("200|183")) {
if(has_body("application/sdp")) {
rtpengine_answer("trust-address RTP/AVP
replace-session-connection replace-origin ICE=remove");
}
}
t_on_failure("media_delete_route");
}
failure_route[media_delete_route] {
if(is_method("INVITE") &&
t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {
xlog("Call with Reply [$rs] make it close");
rtpengine_delete();
}
}
volga629
I encountered a similar issue recently, I was using dialog variables to flag sessions where RTPEngine is engaged so rtpengine_delete only fired on applicable BYE/CANCEL requests. For reasons I have not yet understood the dialog variable was not always available so the sessions were left open and subject to an hours wait for the rtpengine timeouts. I've tried to improve the logic with AVP's however I'm still seeing unclosed sessions so am planning just to always fire it off on a BYE/CANCEL and let RTPEngine drop requests when it is not engaged. For your script I would recommend that you take the delete function out of loose routing and implement it whenever you have BYE/CANCEL requests arriving. I would also highly recommend that you enable the rtpengine CLI so you are able to control session limits on a running instance.Alain, thanks for your anecdotal stats - I've been wondering how far we'll be able to push an instance of RTPEngine. We have some powerful 24 core machines and are using the packet forwarding module and are hoping to approach 10000 sessions per instance. If your figures scale up it sounds like this is very achievable! On Sun, 15 Mar 2020 at 12:05, Alain Bieuzent <alain.bieuz...@free.fr> wrote:Hi, Can you share value of delete-delay, port-min and port-max of your rtpengine configuration. Have you also check if you handle rtpengine_delete on failed calls (in case sip cause code 4XX, 5XX and 6XX). At @job, we handle max 6000 calls on a 6 cores servers without any issue. Regards De : Users <users-boun...@lists.opensips.org> au nom de volga629 via Users <users@lists.opensips.org> Répondre à : volga629 <volga...@networklab.ca>, OpenSIPS users mailling list <users@lists.opensips.org> Date : vendredi 13 mars 2020 à 18:39 À : <users@lists.opensips.org> Objet : [OpenSIPS-Users] opensips + rtpengine Hello Everyone, Might be somebody can point me to right place. Under load Rtpengine on server with 12 core can't pass 400 channels/sessions. Mar 13 18:14:53 CentOS-77-64-minimal rtpengine[14588]: WARNING: [1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in packet from 136.243.43.23:47763: Ran out of ports [d3:sdp289: WARNING: [1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in packet from 136.243.43.23:55847: Unknown call-id [d3:sdp250: It like it not closing calls properly, but I am running rtpengine_delete() in loose _route on BYE or CANCEL. Here are more details https://github.com/sipwise/rtpengine/issues/946 # Handle requests within SIP dialogs route[handle_sequential] { if (has_totag()) { if (loose_route()) { # BYE rtpengine_delete() if (is_method("BYE|CANCEL")) { xlog("LOOSE_ROUTE:DBG: [$rm] trying delete rtpengine\n"); rtpengine_delete(); xlog("Average MOS of the entire call is $rtpstat(MOS-average)\r\n"); xlog("Average MOS of caller is $(rtpstat(MOS-average)[$ft])\r\n"); xlog("Average MOS of callee is $(rtpstat(MOS-average)[$tt])\r\n"); xlog("Min MOS of caller is $(rtpstat(MOS-min)[$ft]) reported at $(rtpstat(MOS-min-at)[$ft])\r\n"); } t_relay(); exit; volga629 _______________________________________________ Users mailing list Users@lists.opensips.org 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
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users