Hello,
I am excited about the new media statistics from RTPEngine, exposed
conveniently into PVs, e.g. jitter, packet loss, MOS, time offset of
lowest and highest MOS scores, etc. Great work!
I am, however, having a bit of trouble understanding how to properly
apply this new functionality, as it is not clearly documented (IMHO):
1. What is the meaning of "global" statistics which do not take into
account an "A" and a "B" side? That is to say, if I have a packet loss
or a jitter or MOS score statistic using just the generic toplevel
values, e.g.
https://kamailio.org/docs/modules/5.1.x/modules/rtpengine.html#rtpengine.p.…
What does that mean?
A functional call ordinarily consists of an inbound and outbound RTP
stream direction relative to the endpoints on both sides of RTPEngine.
Inbound A --> server --> Outbound A
Outbound B <-- server <--- Inbound B
Where do the "global" stats situate themselves in relation to all this?
2. I am given to understand that the statistics for the "A" and "B"
sides of a bidirectional RTP stream can be separated based on an
arbitrary label, using these PVs:
https://kamailio.org/docs/modules/5.1.x/modules/rtpengine.html#rtpengine.p.…https://kamailio.org/docs/modules/5.1.x/modules/rtpengine.html#rtpengine.p.…
How do I use it properly?
My intuition was to try something like this:
rtpengine_offer("replace-origin replace-session-connection ICE=remove label=outbound");
And in the answer/manage handler on the SDP answer:
rtpengine_answer("replace-origin replace-session-connection ICE=remove label=inbound");
Later, when processing a BYE and obtaining subsequent media statistics,
I tried this:
if(check_route_param("proxy_media=yes")) {
$avp(rtpengine_a_label) = 'outbound';
$avp(rtpengine_b_label) = 'inbound';
rtpengine_delete();
route(LOG_RTPENGINE_STATS);
}
But this only gets me stats for the "A" leg in the JSON object I emit:
{
"server_addr": "udp:127.0.0.1:5050",
"a_label": "outbound",
"b_label": "inbound",
"a_leg": {
"min": {
"mos": "4.4",
"at": "0:04",
"packetloss": "0",
"jitter": "0",
"roundtrip": 0
},
"max": {
"mos": "4.4",
"at": "0:04",
"packetloss": "0",
"jitter": "0",
"roundtrip": 0
},
"avg": {
"mos": "4.4",
"packetloss": "0",
"jitter": "0",
"roundtrip": 0,
"samples": 2
}
},
"b_leg": {
"min": {
"mos": "<null>",
"at": "<null>",
"packetloss": "<null>",
"jitter": "<null>"
},
"max": {
"mos": "<null>",
"at": "<null>",
"packetloss": "<null>",
"jitter": "<null>"
},
"avg": {
"mos": "<null>",
"packetloss": "<null>",
"jitter": "<null>"
}
}
}
I also tried rtpengine_delete("label=inbound") (and outbound) individually.
Some clarity on how this all fits together would be appreciated. :-)
Many thanks to Sipwise for great work on it!
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
I am using a *Kamailio 4.4* server. And I would like to install
*http_async_client* module to this server. I have looked in the module
directory(*/usr/local/lib64/kamailio/modules*) to check whether this
*http_async
_client* module already exists there, but it was not there.
And I searched for a solution and only found
<http://www.kamailio.org/dokuwiki/doku.php/tutorials:openser-modular-install>
the method to include new module at the compile time.
I could find the modules source code on GitHub
<https://github.com/sipwise/kamailio/tree/master/modules/http_async_client>.
But I don't know the steps to install a new module to the existing Kamailio
Thank you,
Arunbalan
I have this scenario
Customer --> Kamailio --> Provider1
The route where l route the call to Provider1 is called route["INCOMING"] and I "arm" the replies and failures to : t_on_reply("INCOMING") and t_on_failure("INCOMING"). Provider1 always replies with a 302 Redirect and in the failure_route["INCOMING'] I have this code:
if (t_check_status("302")) {
get_redirects("*");
t_on_branch("REDIRECT_BRANCH");
t_load_contacts();
t_next_contacts();
t_on_failure("SERIAL_FORKING");
t_relay();
exit;
}
In the t_on_failure("SERIAL_FORKING") block I do t_relay() as long as there are more contacts to be processed. Lets say I need to try Provider_2 and Provider_3
failure_route["SERIAL_FORKING"]
{
xlog("L_INFO","mylog: In Failure Route SERIAL_FORKING. Reply [$rs]\n");
if (!t_next_contacts()) {
exit;
}
xlog("L_INFO","mylog: In Failure Route SERIAL_FORKING. Trying next Contact.\n");
t_on_failure("SERIAL_FORKING");
t_relay();
}
I want to use RTPProxy in this scenario and I am using the function rtpproxy_manage() to let kamailio handle it automatically.
RTPProxy
↑
|
|
Customer --> Kamailio --> Provider1
|
|
↓
Provider N
After the 302 response is processed I would like to have the signaling flow "Customer -> Kamailio --> ProviderN" and the RTP flow "Customer --> RTPProxy --> ProviderN"
I have tried inserting the function in several places but can't make it work and what I mean is that sometimes the rtpproxy creates the 1st session and then deletes it as soon as I call it the 2nd time with a message similar to this one (log of rtpproxy) : "INFO:416f20b74a58fb75168175e61b2edece@192.168.1.61:5060:rtpp_cmd_delete_ematch: forcefully deleting session 1 on ports 63502/0". Sometimes the kamailio log shows this message: "ERROR: rtpproxy [rtpproxy.c:2536]: force_rtp_proxy(): incorrect port 0 in reply from rtp proxy"
I think I must call rtpproxy_manage() before I send the INVITE to each of the Providers in the Contact list so they receive a SDP offer with an IP:Port combination provided by the RTPProxy (instead of the ones coming from the Customer). That would be in my route["INCOMING']
Then once Provider_N replies with a 183 with SDP or a 200 OK I would call it again to get a new session to be passed on the reply to my customer. But is the part I am struggling with. Should I add a new reply route inside the failure_route["INCOMING'] only if I am dealing with 302 and do it there ?
I am out of ideas guys and any idea is welcome
Hi,
Is it possible to define two pairs of network interfaces for rtpengine,
e.g. int/ext and up/down?
If so during a call established between interfaces 'int' and 'ext', is it
possible to send a re-INVITE from the calling party on interface 'ext', to
update the RTP destination to an IP on a different interface 'up', for
example? Or does the updated RTP destination have to be on the same
interface as when the call was established?
I have some success updating the RTP destination if it is on the same
interface (different IP:port) however haven't managed to divert it to a
different interface. I wonder if it is possible at all or me missing
something?
Cheers,
Yufei
Hi,
Im new to Kamailio so im sorry if some of my questions will sound a bit
wierd :=)
i have a setup like this: (Kamailio version 5.1)
UA > Kamailio > Freeswitch
Kamailio forwards registration to freeswitch without saving location.
I have configured sip over websockets and im able to register to
Freeswitcha via kamailio.
Also, i use add_path_received() so kamailio adds a path header to register
messages
recv 945 bytes from udp/[192.168.50.60]:5060 at 22:38:07.283809:
------------------------------------------------------------------------
REGISTER sip:192.168.50.60 SIP/2.0
Via: SIP/2.0/UDP
192.168.50.60;branch=z9hG4bKa929.0f66d60c4333f4a3a9d83d41a63295d9.0
Via: SIP/2.0/WSS
192.0.2.110;rport=63296;received=192.168.200.77;branch=z9hG4bK6931435
Max-Forwards: 69
To: <sip:1001@192.168.50.60>
From: <sip:1001@192.168.50.60>;tag=vq30modpgd
Call-ID: dlnrna9o4ngn25fb9d1vi2
CSeq: 196 REGISTER
Authorization: Digest algorithm=MD5, username="1001",
realm="192.168.50.60", nonce="744aaa14-4a86-4ce3-b6d6-419b0a34ee90",
uri="sip:192.168.50.60", response="9b592b874474d4ffe5769f2410baceef",
qop=auth, cnonce="sf7ff0fp8tm5", nc=00000001
Contact: <sip:1001@192.0.2.110
;transport=ws>;reg-id=1;+sip.instance="<urn:uuid:587f4694-7e55-46dc-a858-579a82556a20>";expires=600
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: path, gruu, 100rel, outbound
User-Agent: SIP.js/0.7.0 BB
Content-Length: 0
Path: <sip:192.168.50.60;lr;received=192.168.200.77~63296~6>
------------------------------------------------------------------------
send 719 bytes to udp/[192.168.50.60]:5060 at 22:38:07.329444:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.50.60;branch=z9hG4bKa929.0f66d60c4333f4a3a9d83d41a63295d9.0
Via: SIP/2.0/WSS
192.0.2.110;rport=63296;received=192.168.200.77;branch=z9hG4bK6931435
From: <sip:1001@192.168.50.60>;tag=vq30modpgd
To: <sip:1001@192.168.50.60>;tag=Spya88DKU9gSQ
Call-ID: dlnrna9o4ngn25fb9d1vi2
CSeq: 196 REGISTER
Contact: <sip:1001@192.0.2.110;transport=ws>;expires=600
Date: Fri, 09 Feb 2018 21:38:07 GMT
User-Agent:
FreeSWITCH-mod_sofia/1.6.19+git~20171120T163416Z~b1b21d0695~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Path: <sip:192.168.50.60>;lr;received=192.168.200.77~63296~6
Content-Length: 0
------------------------------------------------------------------------
Once, registered, im trying to originate a call to the registered endpoint
from freeswitch
this results in an invite like this:
send 1757 bytes to udp/[192.168.50.60]:5060 at 22:46:21.252549:
------------------------------------------------------------------------
INVITE sip:1001@192.0.2.110;transport=ws SIP/2.0
Via: SIP/2.0/UDP 192.168.50.65:15060;rport;branch=z9hG4bKXHcX316pDgXZB
Route: <sip:192.168.50.60>;lr;received=192.168.200.77~63296~6
Max-Forwards: 70
From: "" <sip:1002@192.168.50.65>;tag=tZQ393yprj7BK
To: <sip:1001@192.0.2.110;transport=ws>
Call-ID: 8212b700-8885-1236-08b3-000c293ae94e
CSeq: 118770326 INVITE
Contact: <sip:mod_sofia@192.168.50.65:15060>
User-Agent:
FreeSWITCH-mod_sofia/1.6.19+git~20171120T163416Z~b1b21d0695~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 891
X-FS-Support: update_display,send_info
Remote-Party-ID: <sip:1002@192.168.50.65
>;party=calling;screen=yes;privacy=off
Freeswitch appends a route header to the invite specifying kamailio as
route and a received with original uri.
well, here is the issue ... im failing to hit the SIP over websocket
client... Kamailio
my RELAY route is like this
route[RELAY] {
# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("branch_route")) {
xlog("L_ALERT", "Its a Branch, go manage that !!!
<$ru>\n");
t_on_branch("MANAGE_BRANCH");
}
}
if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("onreply_route")) {
xlog("L_ALERT", "its onreply_route, go manage !!!
<$ru>\n");
t_on_reply("MANAGE_REPLY");
}
}
if (is_method("INVITE")) {
if(!t_is_set("failure_route")) {
xlog("L_ALERT", "Its failure_route, go manage !!!
<$ru>\n");
t_on_failure("MANAGE_FAILURE");
}
}
$fs = "udp:192.168.50.60:5060";
xlog("L_ALERT", "Trying to rely !!! <$ru>\n");
if (!t_relay()) {
xlog("L_ALERT", "failed to rely !!! <$ru>\n");
sl_reply_error();
}
exit;
}
here is a part of the log:
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: WARNING: <core>
[core/forward.c:231]: get_send_socket2(): protocol/port mismatch (forced
udp:192.168.50.60:5060, to ws:192.0.2.110:5060)
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: DEBUG: <core>
[core/msg_translator.c:424]: clen_builder(): content-length: 916 (916)
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: WARNING: <core>
[core/msg_translator.c:2765]: via_builder(): TCP/TLS connection (id: 0) for
WebSocket could not be found
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: ERROR: <core>
[core/msg_translator.c:1980]: build_req_buf_from_sip_req(): could not
create Via header
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: ERROR: tm
[t_fwd.c:476]: prepare_new_uac(): could not build request
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: ERROR: tm
[t_fwd.c:1735]: t_forward_nonack(): failure to add branches
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: DEBUG: tm
[t_funcs.c:334]: t_relay_to(): t_forward_nonack returned error -2 (-2)
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: DEBUG: tm
[t_funcs.c:352]: t_relay_to(): -2 error reply generation delayed
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: ERROR: ***
cfgtrace:request_route=[RELAY] c=[/etc/kamailio/kamailio.cfg] l=744 a=26
n=xlog
Feb 9 22:48:48 incfskamtest01 /usr/sbin/kamailio[14896]: ALERT: <script>:
failed to rely !!! <sip:1001@192.0.2.110;transport=ws>
is that because i set a $fu before t_relay() ?
any idea how to approach the issue ?
I meant to reply to Kamailio mailing list.
From: Wilkins, Steve
Sent: Friday, February 9, 2018 12:40 PM
To: 'miconda(a)gmail.com' <miconda(a)gmail.com>
Subject: RE: [SR-Users] t_relay()?
Hi Daniel,
I am not sure what I am doing wrong but I cannot get the forwarded message to print. I am using onend_route() and trying to print the results using xdbg.
I have searched for examples and have had no luck.
Thank you
From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Sent: Friday, February 9, 2018 7:48 AM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org<mailto:sr-users@lists.kamailio.org>>; Wilkins, Steve <swwilkins(a)mitre.org<mailto:swwilkins@mitre.org>>
Subject: Re: [SR-Users] t_relay()?
Hello,
before t_relay() you can't see what is going to the network, because some headers are added when knowing target address and local socket (e.g, Via, Record-Route). You can use onsend_route for seeing the request just before writing to the network.
https://www.kamailio.org/wiki/cookbooks/devel/core#onsend_route
$snd(buf) will give outgoing buffer -- for more see $sndfrom(...) and $sndto(...) vars.
Cheers,
Daniel
On 09.02.18 11:24, Wilkins, Steve wrote:
Hi All,
Could someone please tell me, what variable to I use to see what t_relay() fowarding in its message?
Thank you,
-Steve
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com<http://www.kamailioworld.com>
Hello,
This is actually a follow up to my last question about some providers calls being dropped. I noticed that when calls are dropped, I see a Kamailio log message "Request Timeout" about 5-10 seconds before the call is dropped. I am wondering what could cause this while a call is in progress.
Does Kamailio need to respond to Asterisk with a '200 OK' for an INFO request sent to Kamailio from Asterisk? I am not sure what else could cause this call dropping behavior.
Note: It does not appear to be caused from a missing 'ACK'.
Thank you,
-Steve
I am creating custom phone client, which uses *Kamailio *as a proxy and
it's required to send *push notification* from *Kamailio *to the clients
when a call towards the client reached on *Kamailio*. I found a module for
APNS here* https://github.com/tvntsr/push
<https://github.com/tvntsr/push>*. But
I am developing both Android and IOS clients. So What mechanism I can use
for the Android side?
Is there any module available for *GCM*(Google Cloud Messaging) in Kamailio?
Thank you,
Arunbalan
FYI,
After some tests found, that function "*is_audio_on_hold()*" (textops)
*supports
only rfc 254*3,
where "hold" is indicated by setting the "c" destination addresses for
the media streams to zero (0.0.0.0).
The newest *rfc3264*, where "hold" is indicated by a=sendonly/inactive, *is
not supported*.
Kamailio version 4.4.6.
Best regards,
Julia
Hi All,
Found python library to take system stats during the load.
>>> from getstats import GetStats
>>> stat_obj = GetStats.getstats(dur=300,rate=10)
>>> stat_obj.run_stats()
Running..........
***** Completed capturing the STATS *****
########################################
# stats_2018-02-12_16-47-47_.csv #
########################################
Doc URL: http://getstats.readthedocs.io/en/latest/
If you require use and let me know.
Thanks,
K.Jeevan.