Hello,
have you tried to evaluate the return value of the rtpengine_manage(..) function call in
kamailio.cfg? It should return an error in this case, I think.
In a production setting you should monitor your rtpengine call load with some monitoring
or visualization tools.
Cheers,
Henning
--
Henning Westerholt –
https://skalatan.de/blog/
Kamailio services –
https://gilawa.com<https://gilawa.com/>
From: sr-users <sr-users-bounces(a)lists.kamailio.org> On Behalf Of Youssef Boujraf
Sent: Wednesday, March 30, 2022 2:48 PM
To: sr-users(a)lists.kamailio.org
Subject: Re: [SR-Users] RTPENGINE : Kamailio - Get status if max sessions reached
Dear,
Why to develop another kamailio ?
The question is kamailio is handeling the status received from rtpengine but not sharing
this status for extra control.
Do I need to parse the module code to find where it is ? I ahve seen many people in this
forum or dev forum to ask to get extra status and most of the time an update is done.
Best Regards,
On Wednesday, March 30, 2022 12:05 CEST, "Youssef Boujraf"
<yboujraf@by-research.be<mailto:yboujraf@by-research.be>> wrote:
Dear,
QUESTION :
Through kamailio,
We are using rtpengine_manage and the return value is true or false but don"t know
for which reason.
· How to be informed if rtpengine reach the maximum of sessions and will not
accept any rtp routing ?
· We have seen if rtpengine reached the max-session; The call is accept by
kamailio and finally no audio because SDP not processed
- kamailio.log
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: ALERT: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} <script>: [NATMANAGE] branch_id:0 ruri:
sip:9919993@public:32617;transport=UDP;rinstance=f5d124565504bdb6, method:INVITE,
status:<null>, extra_id: z9hG4bK-524287-1---290944f5547c740a0, rtpengine_manage:
replace-origin replace-session-connection via-branch=extra
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine_funcs.c:144]: check_content_type(): type
<application/sdp> found valid
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:1834]: build_rtpp_socks(): same
rtpengines list version: 1 (1648562844)
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3276]: select_rtpp_node_old(): rtpengine
hash table lookup failed to find node for calllen=24 callid=nIdGvZZNiFnt3_r0xSIKpQ..
viabranch=z9hG4bK-524287-1---290944f5547c740a0
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3167]: select_rtpp_node_new(): sum is =
27
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2691]: rtpp_function_call(): proxy reply:
d6:result10:load limit7:message30:Parallel session limit reachede
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: INFO: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2715]: rtpp_function_call(): proxy
udp:192.168.1.33:2223<http://192.168.1.33:2223> has reached its load limit (Parallel
session limit reached) - trying next one
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:1834]: build_rtpp_socks(): same
rtpengines list version: 1 (1648562844)
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3276]: select_rtpp_node_old(): rtpengine
hash table lookup failed to find node for calllen=24 callid=nIdGvZZNiFnt3_r0xSIKpQ..
viabranch=z9hG4bK-524287-1---290944f5547c740a0
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3167]: select_rtpp_node_new(): sum is =
27
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2691]: rtpp_function_call(): proxy reply:
d6:result10:load limit7:message30:Parallel session limit reachede Mar 29 16:08:14 kamailio
/usr/sbin/kamailio[21065]: INFO: {1 2 INVITE nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine
[rtpengine.c:2715]: rtpp_function_call(): proxy
udp:127.0.0.1:2223<http://127.0.0.1:2223> has reached its load limit (Parallel
session limit reached) - trying next one
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:1834]: build_rtpp_socks(): same
rtpengines list version: 1 (1648562844)
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3276]: select_rtpp_node_old(): rtpengine
hash table lookup failed to find node for calllen=24 callid=nIdGvZZNiFnt3_r0xSIKpQ..
viabranch=z9hG4bK-524287-1---290944f5547c740a0
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3167]: select_rtpp_node_new(): sum is =
27
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: INFO: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2900]: rtpp_test(): rtpengine instance
<udp:127.0.0.1:2223<http://127.0.0.1:2223>> found, support for it enabled
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: INFO: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2900]: rtpp_test(): rtpengine instance
<udp:192.168.1.33:2223<http://192.168.1.33:2223>> found, support for it
enabled
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3167]: select_rtpp_node_new(): sum is =
27
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: ERROR: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3330]: select_rtpp_node(): rtpengine
failed to select new for calllen=24 callid=nIdGvZZNiFnt3_r0xSIKpQ..
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21065]: ERROR: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2678]: rtpp_function_call(): no available
proxies
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21070]: ALERT: {2 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} <script>: [NATMANAGE] branch_id:0 ruri: <null>,
method:INVITE, status:100, extra_id: z9hG4bK-524287-1---290944f5547c740a0,
rtpengine_manage: replace-origin replace-session-connection trust-address
via-branch=extra
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21069]: ALERT: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} <script>: [NATMANAGE] branch_id:1 ruri:
sip:9919993@public:32617;transport=UDP;rinstance=f5d124565504bdb6, method:INVITE,
status:<null>, extra_id: z9hG4bK-524287-1---290944f5547c740a0, rtpengine_manage:
replace-origin replace-session-connection
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21069]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:1834]: build_rtpp_socks(): same
rtpengines list version: 1 (1648562844)
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21069]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3276]: select_rtpp_node_old(): rtpengine
hash table lookup failed to find node for calllen=24 callid=nIdGvZZNiFnt3_r0xSIKpQ..
viabranch=
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21069]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:3167]: select_rtpp_node_new(): sum is =
27
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21069]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2691]: rtpp_function_call(): proxy reply:
d7:warning38:Call-ID not found or tags didn't match6:result2:oke Mar 29 16:08:14
kamailio /usr/sbin/kamailio[21069]: DEBUG: {1 2 INVITE nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine
[rtpengine.c:2784]: rtpp_function_call(): rtpengine hash table insert
node=udp:192.168.1.33:2223<http://192.168.1.33:2223> for calllen=24
callid=nIdGvZZNiFnt3_r0xSIKpQ.. viabranch=
Mar 29 16:08:14 kamailio /usr/sbin/kamailio[21069]: DEBUG: {1 2 INVITE
nIdGvZZNiFnt3_r0xSIKpQ..} rtpengine [rtpengine.c:2801]: rtpp_function_call(): rtpengine
hash table remove entry for callen=24 callid=nIdGvZZNiFnt3_r0xSIKpQ.. viabranch=
- rtpengine.log :
Mar 29 16:08:14 rtp01srv rtpengine[3921]: INFO: [nIdGvZZNiFnt3_r0xSIKpQ..]: [control]
Received command 'offer' from
192.168.1.41:42822<http://192.168.1.41:42822>
Mar 29 16:08:14 rtp01srv rtpengine[3921]: DEBUG: [nIdGvZZNiFnt3_r0xSIKpQ..]: [control]
Dump for 'offer' from 192.168.1.41:42822<http://192.168.1.41:42822>: {
"supports": [ "load limit" ], "sdp": "v=0
Mar 29 16:08:14 rtp01srv rtpengine[3921]: o=Zoiper 141319690 1 IN IP4 192.168.30.216 Mar
29 16:08:14 rtp01srv rtpengine[3921]: s=Z Mar 29 16:08:14 rtp01srv rtpengine[3921]: c=IN
IP4 192.168.30.216
Mar 29 16:08:14 rtp01srv rtpengine[3921]: t=0 0 Mar 29 16:08:14 rtp01srv rtpengine[3921]:
m=audio 8000 RTP/AVP 0 101 8 3 97 Mar 29 16:08:14 rtp01srv rtpengine[3921]: a=rtpmap:101
telephone-event/8000
Mar 29 16:08:14 rtp01srv rtpengine[3921]: a=fmtp:101 0-16 Mar 29 16:08:14 rtp01srv
rtpengine[3921]: a=rtpmap:97 iLBC/8000 Mar 29 16:08:14 rtp01srv rtpengine[3921]: a=fmtp:97
mode=30
Mar 29 16:08:14 rtp01srv rtpengine[3921]: a=sendrecv
Mar 29 16:08:14 rtp01srv rtpengine[3921]: ", "replace": [
"origin", "session-connection" ], "call-id":
"nIdGvZZNiFnt3_r0xSIKpQ..", "via-branch":
"z9hG4bK-524287-1---290944f5547c740a0", "received-from": [
"IP4", "public" ], "from-tag": "75983054",
"command": "offer" }
Mar 29 16:08:14 rtp01srv rtpengine[3921]: ERR: [nIdGvZZNiFnt3_r0xSIKpQ..]: [core] Parallel
session limit reached (2)
Mar 29 16:08:14 rtp01srv rtpengine[3921]: INFO: [nIdGvZZNiFnt3_r0xSIKpQ..]: [control]
Replying to 'offer' from 192.168.1.41:42822<http://192.168.1.41:42822>
(elapsed time 0.000058 sec)
Mar 29 16:08:14 rtp01srv rtpengine[3921]: DEBUG: [nIdGvZZNiFnt3_r0xSIKpQ..]: [control]
Response dump for 'offer' to 192.168.1.41:42822<http://192.168.1.41:42822>:
{ "result": "load limit", "message": "Parallel session
limit reached" }
Mar 29 16:08:14 rtp01srv rtpengine[3921]: INFO: [control] Received command 'ping'
from 192.168.1.41:42822<http://192.168.1.41:42822>
Mar 29 16:08:14 rtp01srv rtpengine[3921]: DEBUG: [control] Dump for 'ping' from
192.168.1.41:42822<http://192.168.1.41:42822>: { "command":
"ping" }
Mar 29 16:08:14 rtp01srv rtpengine[3921]: INFO: [control] Replying to 'ping' from
192.168.1.41:42822<http://192.168.1.41:42822> (elapsed time 0.000001 sec)
Mar 29 16:08:14 rtp01srv rtpengine[3921]: DEBUG: [control] Response dump for
'ping' to 192.168.1.41:42822<http://192.168.1.41:42822>: {
"result": "pong" }
How to get this information then we could cancel the call or send sip message that the
number of max call is reached ?
--
Youssef