Hello everybody!
Kamailio works as a Registrar. Additionally, rtpengine is deployed next to it. Using the module rtpgngine I change SDP. Webrtc <-> SIP calls work fine. RTPengine proxies media. It is necessary to understand that when the call comes, I determine what Protocol the call came wss/tcp/udp, and then through the command "rtpengine_manage" change SDP accordingly. Now I have a new task. Wake up mobile customers through push notification. This client may be as WebRTC and also regular SIP. Trying to use TSILO module.
# User location service
route[LOCATION] {
lookup("location");
$var(rc) = $rc;
if (is_method("INVITE"))
{
if (t_newtran())
{
route(SEND_PUSH);
xlog("L_INFO", "tsilo store\n");
ts_store();
}
}
switch ($var(rc))
{
case 1:
xlog("L_INFO", "LOCATION, Subscriber found, RC: $var(rc)\n");
route(RELAY);
break;
case -1:
xlog("L_INFO", "LOCATION, Subscriber doesn't found, RC: $var(rc)\n");
exit;
break;
case -3:
xlog("L_INFO", "LOCATION, Subscriber doesn't found, RC: $var(rc)\n");
send_reply("404", "Not Found");
exit;
case -2:
xlog("L_INFO", "LOCATION, Method Not Allowed, RC: $var(rc)\n");
send_reply("405", "Method Not Allowed");
exit;
}
}
If a call occurs when the called client is registered, then we go to the route(RELAY), which creates a branch in which I change the SDP. Everything works.
route[RELAY] {
# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|BYE")) {
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
}
if (!t_relay()) {
sl_reply_error();
}
exit;
}
And already in MANAGE BRANCH the necessary SDP is put.
If the called party is not registered. In the beginning everything goes well.
I find this caller through a separate server. Send push notification. The client successfully registers on kamailio.
# Handle SIP registrations
route[REGISTRAR] {
if (!is_method("REGISTER")) return;
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
setbflag(FLB_NATSIPPING);
}
if(isflagset(FLT_SRC_WSS))
{
setbflag(FLB_DST_WS);
}
if (!save("location"))
{
sl_reply_error();
}
ts_append("location", "$tu")
exit;
}
Next I better show a piece of the log:
окт 31 14:55:08 /usr/sbin/kamailio[17488]: exec: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} *** cfgtrace:request_route=[REGISTRAR] c=[/etc/kamailio/kamailio.cfg] l=429 a=26 n=ts_append
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tsilo [ts_append.c:72]: ts_append(): transaction 8800:338205132 found for 1234567890, going to append branches
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tm [t_lookup.c:1629]: t_lookup_ident_filter(): transaction found
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} registrar [lookup.c:255]: lookup_helper(): contact for [1234567890] found by address
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} registrar [lookup.c:456]: lookup_helper(): instance is
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tm [t_append_branches.c:77]: t_append_branches(): transaction 8800:338205132 in status 0
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tm [t_append_branches.c:99]: t_append_branches(): Call uefn7rvufi112jj5lt91: 0 (1) outgoing branches
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tm [t_append_branches.c:126]: t_append_branches(): Current uri sip:1234567890@10.10.10.1:58027;transport=TCP;rinstance=727a64a3a59c508f
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} <core> [core/msg_translator.c:162]: check_via_address(): (50.7.93.27, uas7i396ceb5.invalid, 0)
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tm [t_append_branches.c:149]: t_append_branches(): added branch [sip:1234567890@10.10.10.1:58027;transport=TCP;rinstance=727a64a3a59c508f] with ruid [uloc-5dbacb09-4450-7]
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} tm [t_append_branches.c:163]: t_append_branches(): Call uefn7rvufi112jj5lt91: 0 (0) outgoing branches after clear_branches()
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} <core> [core/tcp_main.c:2238]: tcpconn_send_put(): send from reader (17488 (21)), reusing fd
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} <core> [core/tcp_main.c:2473]: tcpconn_do_send(): sending...
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} <core> [core/tcp_main.c:2507]: tcpconn_do_send(): after real write: c= 0x7fb39dde4c68 n=3131 fd=12
окт 31 14:55:08 /usr/sbin/kamailio[17488]: DEBUG: {1 2 REGISTER cY6rPubTvJ3ZbyxOrrvGHw..} <core> [core/tcp_main.c:2508]: tcpconn_do_send(): buf=
Thus, the transaction wakes up and the initial INVITE is sent to the new registered client without any SDP change! Which eventually leads to 415 error.
Now the question itself. Tell me! As me at this moment intercept this INVITE, to it has passed through in advance prepared path for changing SDP.
Thank you.
--
Oleg Podguyko
We are using keepalived with virtual IP Address for Kamailio, dispatcher
module for Asterisk, 2 MySQL Databases master-master replicated and 2
Servers with ProxySQL.
So far so good.
Hi,
What is the relationship between the `ctl` modparams
`binrpc_buffer_size`, `binrpc_max_body_size`, and
`binrpc_struct_max_body_size`?
More especially, how interdependent are they? Is there a set of
circumstances in which one would wish for the structure buffer to be
smaller than the reply body buffer? What about the internal buffer? Is
it used only for some kind of intermediate formatting, or does it also
hold the entire reply in some aspect?
The reasons for asking are predictable: RPC command 'dlg.list' throws
out "reply too big" on some occasions, and rather than simply increasing
all of these drastically, I would like to learn more about which ones it
makes sense to increase, and in what proportion with respect to each
other. I also think this idea should be more clearly developed in the
documentation.
Thanks,
-- 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/
Hello!
I'm using branch flags but not sure if the behavior is correct.
There is a logic in branch route that decides if branch flag must be set
and does it with this command: *setbflag(FLB_FLAG, $T_branch_idx)*. Then
I'm checking if the flag is set with *if* statement later in the
configuration file for requests and in onreply route for replies: *if
(isbflagset(FLB_FLAG, $T_branch_idx))*.
The thing is that *if* statement always returns true. The only way I can
fix this behavior is to use *resetbflag* at the beginning of branch
route: *resetbflag(FLB_SIPTOPUB,
$T_branch_idx)*.
Thank you!
Regards, Volodya Ivanets.
i have this in asterisk integration how to, and i noted the "exit"
before the "if($au!=$tU)" .. i dont understan the conditional and the
exit there!
please can someon xplain me that!?
# authenticate the REGISTER requests (uncomment to enable auth)
#!ifdef WITH_ASTERISK
if (!www_authorize("$td", "sipusers"))
#!else
if (!www_authorize("$td", "subscriber"))
#!endif
{
www_challenge("$td", "0");
exit;
}
if ($au!=$tU)
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
i investigate at the kamailio cgf documentation and there's no clear
topic related!
http://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#tu_-_to_uri
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Hello Rhys,
I already replied to you yesterday, maybe it got into Spam on your side. :-) Quote below:
> thanks. About the presence integration question - according to my research currently the only possibility would be to use the
> existing Skype APIs and then use this (per interop-mode) also in MS Teams.
>
> Microsoft announced the availability of a API to set the presence status also for Teams, this is now scheduled for Q1 2020. There > are other limitations which also needs to be solved from MS and they are also scheduled for Q1 2020.
> Feel free to contact me directly if you are interested in this topics.
Cheers,
Henning
Am 29.10.19 um 08:51 schrieb Rhys Hanrahan:
Hi Henning,
This is a great article, thanks for sharing. I'm wondering if you've experimented with the possibility of integration of presence/dialog information with teams as well?
Pretty much every integration guide I've seen on MS's UC solutions, including the previous ones (Lync, Communicator, SFB ) always seem limited to integrating calling via trunks. To me, the integration is not complete unless you can integrate presence things like:
* If a user is on the phone then their status should be "busy" on Teams. When off call, set back to Available.
* If a user is on a call in teams, our PBX should consider their PBX extension as "in use".
Not sure it's possible, because I haven't seen anything of the sort being done yet, but I'm curious if this is something you looked into at all?
Thanks.
Rhys Hanrahan
Chief Information Officer
Nexus One Pty Ltd
E: support(a)nexusone.com.au<mailto:support@nexusone.com.au>
P: +61 2 9191 0606
W: http://www.nexusone.com.au/
M: PO Box 127, Royal Exchange NSW 1225
A: Level 10 307 Pitt St, Sydney NSW 2000
[http://quintus.nexusone.com.au/~rhys/nexus1-email-sig.jpg]
________________________________
From: sr-users <sr-users-bounces(a)lists.kamailio.org><mailto:sr-users-bounces@lists.kamailio.org> on behalf of Henning Westerholt <hw(a)skalatan.de><mailto:hw@skalatan.de>
Sent: Tuesday, 29 October 2019 3:21 AM
To: Kamailio (SER) - Users Mailing List
Cc: Kamailio (SER) - Development Mailing List
Subject: [SR-Users] Kamailio as SBC for Microsoft Teams
Hello,
I have created a “How-To” blog post on using Kamailio as “session border controller” for Microsoft Teams Direct Routing:
https://skalatan.de/en/blog/kamailio-sbc-teams<https://skalatan.de/de/blog/kamailio-sbc-teams>
You can this way use all the existing possibilities that Kamailio provide to interact with MS Teams as well.
Best regards,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev(a)lists.kamailio.org<mailto:sr-dev@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
Kamailio Merchandising - https://skalatan.de/merchandising/
Kamailio services - https://skalatan.de/services
Henning Westerholt - https://skalatan.de/blog/
FOSDEM - Real Time Communications devroom CfP
=============================================
Overview
--------
[FOSDEM](https://fosdem.org) is one of the world's premier meetings of
free software developers, with over five thousand people attending each
year. FOSDEM 2020 takes place 1-2 February 2020 in Brussels, Belgium.
This document contains information about:
- Real-Time Communications developer room (devroom) and lounge
- speaking opportunities
- volunteering in the devroom and lounge
- social events (the legendary FOSDEM Beer Night and Saturday night
dinners provide endless networking opportunities)
- the Planet aggregation sites for RTC blogs
**NEW:** Save yourself entering Free-RTC events and CFP deadlines into
your calendar and task list, follow our iCalendar feed:
https://freertc.org/events.ics
Call for participation - Real Time Communications (RTC)
-------------------------------------------------------
The Real-Time devroom and Real-Time lounge are about all things
involving real-time communication, including: XMPP, SIP, WebRTC,
telephony, mobile VoIP, codecs, peer-to-peer, privacy and encryption.
**We are looking for speakers for the devroom and volunteers and
participants for the tables in the Real-Time lounge.**
The devroom is only on Sunday, 2nd of February 2020. The lounge will be
present for both days.
To discuss the devroom and lounge, please join the [Free-RTC mailing
list](http://lists.freertc.org/mailman/listinfo/discuss).
### Speaking opportunities
Note: if you used FOSDEM Pentabarf before, please use the same
account/username
Real-Time Communications devroom: deadline 23:59 UTC on 15th of
December. Please use the
[Pentabarf](https://penta.fosdem.org/submission/FOSDEM20/) system to
submit a talk proposal for the devroom. On the "General" tab, please
look for the "Track" option and choose "Real Time Communications
devroom".
Other devrooms and lightning talks: some speakers may find their topic
is in the scope of more than one devroom. It is encouraged to apply to
more than one devroom and also consider proposing a lightning talk, but
please be kind enough to tell us if you do this by filling out the notes
in the form. Here you can find the [full list of
devrooms](https://www.fosdem.org/2020/schedule/tracks/) and here you can
apply for a [lightning talk](https://fosdem.org/submit).
### First-time speaking?
FOSDEM devrooms are a welcoming environment for people who have never
given a talk before. Please feel free to contact the devroom
administrators personally if you would like to ask any questions about
it.
### Submission guidelines
The Pentabarf system will ask for many of the essential details. Please
remember to re-use your account from previous years if you have one.
In the "Submission notes", please tell us about:
- The purpose of your talk
- Any other talk applications (devrooms, lightning talks, main track)
- Availability constraints and special needs
You can use HTML and links in your bio, abstract and description.
If you maintain a blog, please consider providing us with the URL of a
feed with posts tagged for your RTC-related work.
We will be looking for relevance to the conference and devroom themes,
presentations aimed at developers of free and open source software about
RTC-related topics.
Please feel free to suggest a duration between 20 minutes and 55 minutes
but note that the final decision on talk durations will be made by the
devroom administrators based on the number of received proposals. As the
two previous devrooms have been combined into one, we may decide to give
shorter slots than in previous years so that more speakers can
participate.
Please note FOSDEM aims to record and live-stream all talks. The CC-BY
license is used.
Volunteers needed
-----------------
To make the devroom and lounge run successfully, we are looking for
volunteers:
- FOSDEM provides video recording equipment and live streaming,
volunteers are needed to assist in this
- Organizing one or more restaurant bookings (dependending upon number
of participants) for the evening of Saturday, 1 February
- Participation in the Real-Time lounge
- Circulating this Call for Participation to other mailing lists
Social events and dinners
-------------------------
The traditional FOSDEM beer night occurs on Friday, 31st of January.
On Saturday night, there are usually dinners associated with each of the
devrooms. Most restaurants in Brussels are not so large so these dinners
have space constraints and reservations are essential. Please subscribe
to the [Free-RTC mailing
list](http://lists.freertc.org/mailman/listinfo/discuss) for further
details about the Saturday night dinner options and how you can register
for a seat.
Related events around FOSDEM
----------------------------
As per usual, the [XMPP
Summit](https://wiki.xmpp.org/web/Conferences/Summit_24) is happening
ahead of FOSDEM. This time it will take place on the 30th and 31st of
January also in Brussels. All details are available on the [summit
website](https://wiki.xmpp.org/web/Conferences/Summit_24).
Spread the word and discuss
---------------------------
If you know of any mailing lists where this CfP would be relevant,
please forward this document. If this devroom excites you, please blog
or microblog about it, especially if you are submitting a talk.
If you regularly blog about RTC topics, please send details about your
blog to the planet site administrators:
- All projects https://planet.freertc.org planet(a)freertc.org
- XMPP https://planet.jabber.org ralphm(a)ik.nu
- SIP https://planet.sip5060.net planet(a)sip5060.net
- (Español) https://planet.sip5060.net/es/ planet(a)sip5060.net
Please also link to the Planet sites from your own blog or web site as
this helps everybody in the free real-time communications community.
Contact
-------
For any private queries, contact us directly using the address
**fosdem-rtc-admin(a)freertc.org** and for any other queries please ask on
the [Free-RTC mailing
list](http://lists.freertc.org/mailman/listinfo/discuss).
The devroom administration team:
- Saúl Ibarra Corretgé <s(a)saghul.net>
- Ralph Meijer <ralphm(a)ik.nu>
- Daniel-Constantin Mierla <miconda(a)gmail.com>
- Daniel Pocock <daniel(a)pocock.pro>
- Guus der Kinderen <guus.der.kinderen(a)gmail.com>
Hi, we are having a problem with a network change use case. It goes on
something like this:
1. Kamailio receives INVITE from caller.
2. Kamailio sends INVITE to callee MUA.
3. MUA response with 100, then 183.
4. MUA then loses network connectivity and re-establishes access with
another IP address.
5. MUA sends 200 OK from the new IP address, but with `Contact` still set
as the old address (which I think it should, because you aren't allowed to
change contact in the middle of dialog?)
6. Kamailio forwards 200 OK to caller and receives ACK.
7. Kamailio sends ACK to old IP address of MUA.
The last step is obviously a problem as the MUA will not be able to see the
ACK.
I'm trying to see how to resolve this issue. I can capture the "$si" and
"$sp" of the new address in the reply route (I also tried to get the MUA to
send OPTIONS immediately after reestablishing connectivity, and capture
"$si"/"$sp" there, which also works), but I can't figure out how to update
the destination of the ACK. I've tried running `fix_nated_contact()` as
well as trying to write into various pseudo variables - in either the
OPTIONS request handler or the 200 reply handler - which either errors or
does nothing.
Any suggestions?
--
Oded Arbel
Hi!
I'm trying to get Kamailio working as a traffic capture on a same machine with other PBX software installed.
Actually, traffic is mirrored with
iptables -A PREROUTING -t mangle -i eth0 -p udp --dport 5060 -j TEE --gateway 127.0.0.2 (https://link.getmailspring.com/link/AB5F9D36-533D-4A52-ADE3-FB76B813163C@ge…)
iptables -t nat -A PREROUTING -d 127.0.0.2 -p udp --dport 5060 -j DNAT --to 127.0.0.1:5062 (https://link.getmailspring.com/link/AB5F9D36-533D-4A52-ADE3-FB76B813163C@ge…)
Kamailio request route is super simple
request_route {
xlog("L_ALERT", "[SIP-PACKET] Got packet [F=$fu R=$ru D=$du M=$rm IP=($si:$sp $Ri:$Rp) ID=$ci]\n");
drop;
}
I was trying to get Kamailio just listen on interface 127.0.0.1:5062, but no luck
listen=udp:127.0.0.1:5062
Next was to use sipcapture module with following parameters
loadmodule "sipcapture.so"
modparam("sipcapture", "db_url", "text:///tmp/")
modparam("sipcapture", "raw_socket_listen", "127.0.0.1:5060-5062")
modparam("sipcapture", "raw_interface", "lo")
modparam("sipcapture", "promiscious_on", 1)
Also no luck. Means Kamailio can't see packets, but I see em with wireshark on lo interface.
What is best way to get it working? Or I'm missing something?
Thanks!
Hi,
I have an issue where a client is sending cancel after the call has been answered but before the client received the 200OK, I know they should then respond with a BYE based on the 200 final result, but they don’t (Meaning the call / billing stays up)..
Is there a way I can timeout a call/force BYE if ACK is not received to the 200 OK?
I know technically this is the clients issue but they can’t / won’t fix
Thanks is advance
Oz.