Hi,
I have below scenario:
User registers on Kamailio server, calls to a number which is forwarded to
asterisk through dispatcher, asterisk server answers and sends a text
message to the caller using sendText but first message is delivered to
client with message "501 Not Implemented" but in the subsequent calls
asterisk shows that the text was delivered but kamailio did not detect the
message.
Guys, any help would be appreciated, I am using the below mentioned config.
https://github.com/havfo/WEBRTC-to-SIP/blob/master/etc/kamailio/kamailio.cfg
Kamailio version: 5.2
Hello,
last week we had the 2nd annual Kamailio Developers Meeting hosted by
Sipgate in Dusseldorf, Germany:
* https://www.kamailio.org/w/developers-meeting/
16 people were at the event in various roles.
Giacomo Vacca published on his blog a good summary of what happened there:
*
https://www.giacomovacca.com/2019/11/my-notes-on-kamailio-developer-meeting…
This year we had a lot of discussions, as well as work done on multiple
planes, not only Kamailio code. So I am trying to list here some of the
conclusions for future development, the technical aspects of the
meeting, so everyone is aware and can provide feedback.
1) Effective work was done on:
* kamailio code
* kamailio rpm packaging
* kamailio tools (kamctl)
* kamailio release process
* kamailio project keys (to be used to sign the packages)
2) Documentation
2.a) Wiki
* it was somehow a rough consensus to move the wiki content to github,
along with changing the format from dokuwiki markdown to the
standard/github markdown. This should enable people to make pull
requests so developers or community members can review and aprove new
content. It also makes it easier to contribute using existing github
account, now the kamailio.org/wiki is requiring to make a dedicated
account, which many prefer not to do it.
* the presentation can be done either by using mkdocs to generate html
files hosted on kamailio.org or using the github provided wiki portal.
2.b) Docs for variables and transformations
* there was a proposal to move them in the documentation the modules
that export them, there are pros and cons, needs more discussions. Now
they are in the wiki, so this probably has to resume after deciding on 2.a).
3) Kamailio Modules
3.a) replication (dmq) - several participants discussed about
negotiations between nodes to take active role on some cases (e.g.,
active dialogs)
3.b) api integration - quite some interest in JSON-based API routing,
concluding in extending rtjson to cover more use cases
3.c) security - have options to restrict the use of TLS1.3 or newer
4) Kamailio Releases
* v5.3.2 was released during the event, allowing to document the process
* work to automatize the process is planned, then eventually assing
teams for takeing cares of releases from specific branches
5) Kamailio Testing
* existing docker-based testing framework should be extended and
integrated in CD/CI pipeline
6) Kamailio packages
6.a) rpms
* rpm.kamailio.org has been prepared and is expected to take over the
opensuse build service for building rpms and hosting them. Expected to
provide support for hosting many kamailio versions in the same release
series so one can do downgrade to older releases. Also, there is work in
progress to provide nightly builds.
6.b) debs
* work is planned to offer many kamailio versions in the same release
series
7) Kamailio tools
* kamctl/kamdbctl should be obsoleted in favor of kamcli, which offers
a better framework for input validation and output formatting, as well
as better portability, no longer depending on shell interpreter
8) Various discussions
* kemi exports from C point of view and how to combine the
documentation for modules and their kemi exports
* how to make kamaiio friendlier in virtualized environments (ended up
in the need of making the use of advertised address a bit more dynamic)
* project organizatoric topics - to be approached separately
* next events - Fosdem - someone should submit a proposal to present
about Kamailio
9) Long term goals
We speak here more or less about Kamailio 6.0 ...
* change the behaviour of the native config interpreter to be
consistent with the other programming languages in terms of handling the
response code (change what is now: the evaluation of negative value to
false and positive value to true and the hidden return 0 to exit)
* make the pool of processes more generic, so they can handle traffic
from more sockets (being sip traffic or something else) -- this should
make better use of resources, as some sockets might be less busy that others
I hope I covered the important topics, if I remember something else, I
will reply on this thread. Or maybe other participants can contribute
missing topics.
Should anyone have comments or suggestions on the above topics, or new
ones, let's discuss on sr-users because it impacts the long term use of
Kamailio (sr-dev is cc-ed now for notification purposes).
Overall, there were 2 very intensive days, however in a friendly and
relaxed environment offered by Sipgate. Extremely useful discussions,
not only about Kamailio, but about RTC ecosystem. At the evening social
network event event, a couple of external people joined, some of them
presenting very interesting use cases of Kamailio.
Many thanks to all participants that allocated time and resources to
come to Dusseldorf, as well as to the companies that covered expenses
for participants.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
Hello,
Kamailio is crashing when i'm trying to set the parameter;
modparam("tm|usrloc", "xavp_contact", "ulattrs")
That's happening with Kamailio 5.3.1 and 5.2.5 too.
Crash is happening when Im register 2 devices with the same extension.
This is the core dump:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/sbin/kamailio -P
/var/run/kamailio/kamailio.pid -f /usr/local/etc/ka'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000057cca2 in xavp_get_internal (name=0x8, list=0x0, idx=0,
prv=0x0) at core/xavp.c:288
288 core/xavp.c: No such file or directory.
(gdb) bt
#0 0x000000000057cca2 in xavp_get_internal (name=0x8, list=0x0, idx=0,
prv=0x0) at core/xavp.c:288
#1 0x0000000000581869 in xavp_insert (xavp=0x0, idx=0, list=0x0) at
core/xavp.c:752
#2 0x00007f05be0ee3a1 in ki_t_next_contacts (msg=0x7f05cb76c218) at
t_serial.c:552
#3 0x00007f05be0f09e8 in t_next_contacts (msg=0x7f05cb76c218, key=0x0,
value=0x0) at t_serial.c:756
#4 0x0000000000434d41 in do_action (h=0x7ffe93c9cad0, a=0x7f05cb642250,
msg=0x7f05cb76c218) at core/action.c:1067
#5 0x00000000004418e8 in run_actions (h=0x7ffe93c9cad0, a=0x7f05cb642250,
msg=0x7f05cb76c218) at core/action.c:1572
#6 0x0000000000441fa9 in run_actions_safe (h=0x7ffe93c9de90,
a=0x7f05cb642250, msg=0x7f05cb76c218) at core/action.c:1636
#7 0x000000000065734e in rval_get_int (h=0x7ffe93c9de90,
msg=0x7f05cb76c218, i=0x7ffe93c9cf78, rv=0x7f05cb642570, cache=0x0) at
core/rvalue.c:912
#8 0x000000000065b8fe in rval_expr_eval_int (h=0x7ffe93c9de90,
msg=0x7f05cb76c218, res=0x7ffe93c9cf78, rve=0x7f05cb642568) at
core/rvalue.c:1910
#9 0x000000000065bd51 in rval_expr_eval_int (h=0x7ffe93c9de90,
msg=0x7f05cb76c218, res=0x7ffe93c9d42c, rve=0x7f05cb642c98) at
core/rvalue.c:1918
#10 0x0000000000434807 in do_action (h=0x7ffe93c9de90, a=0x7f05cb645028,
msg=0x7f05cb76c218) at core/action.c:1043
#11 0x00000000004418e8 in run_actions (h=0x7ffe93c9de90, a=0x7f05cb637e48,
msg=0x7f05cb76c218) at core/action.c:1572
#12 0x0000000000431767 in do_action (h=0x7ffe93c9de90, a=0x7f05cb583858,
msg=0x7f05cb76c218) at core/action.c:691
#13 0x00000000004418e8 in run_actions (h=0x7ffe93c9de90, a=0x7f05cb574750,
msg=0x7f05cb76c218) at core/action.c:1572
#14 0x0000000000442071 in run_top_route (a=0x7f05cb574750,
msg=0x7f05cb76c218, c=0x0) at core/action.c:1657
#15 0x00000000005874a9 in receive_msg (buf=0xa6ec00 <buf.6868> "OPTIONS
sip:10@192.168.0.231:5060 SIP/2.0\r\nVia: SIP/2.0/UDP
192.168.0.231;branch=z9hG4bKd8a9.1b3abe656532065414a2f35a8916008d.1\r\nVia:
SIP/2.0/UDP 192.168.0.131:5060;received=192.168.0.131;branch=z9hG"...,
len=694, rcv_info=0x7ffe93c9e4d0) at core/receive.c:341
#16 0x000000000047bf81 in udp_rcv_loop () at core/udp_server.c:541
#17 0x0000000000424f9d in main_loop () at main.c:1669
#18 0x000000000042c688 in main (argc=13, argv=0x7ffe93c9ea18) at main.c:2710
Thank you.
Hello,
I'm trying to use parallel forking if one extension is registered from
multiple devices. (using WebSockets)
This is the related code from kamailio.cfg:
------------------------------------------------------------------------------------------------------------------------------------
if (!t_load_contacts()) {
xlogl("L_WARN", "Error loading contacts for $rU\n");
sl_send_reply("500", "Server Internal Error (Code:$cfg(line))");
exit;
} else {
xlogl("L_INFO", "Contacts loaded for $rU\n");
}
if (!t_next_contacts()) {
xlogl("L_INFO", "t_next_contacts - Only one contact found for $rU,
calling\n");
} else {
xlogl("L_INFO", "t_next_contacts - Multiple contacts found, parallel
forking\n");
}
route(RELAY);
------------------------------------------------------------------------------------------------------------------------------------
I noticed that on Kamailio 5.2.5 - this code is working fine, and Kamailio
is sending an INVITE to both Devices.But, on Kamailio 5.3.1 - that's not
working anymore. For some reason, kamailio is sending just one INVITE to
one device with wrong URI. The URI is set to the second device instead of
the correct one.
Was something changed in the t_next_contacts function related to this?
Thank you
I'm seeing this in the log and kamailio is crashing every hour or so:
CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on
33/var/log/kamailio/kamailio.log
Any ideas? Should I emergency upgrade to 5.3.1?
Hello
I am facing a problem as below. Please suggest for the work around.
My call flow is like this.
SIP Gateway-1 (IP x.179) -> SIP Gateway-2 ( IP x.177) -> Kamalio+RTPProxy
So when the call arrives at Kamalio+RTPProxy, i m getting below in log.
Nov 26 23:25:31 rtpproxy[18508]: INFO:GLOBAL:rtpp_command_ul_handle: new
IPv4/IPv4 session 1b7c870763616c6c15fff410@ 192.168.100.177, tag
1aa18fc201a68168;1 requested, type strong
Nov 26 23:25:31 rtpproxy[18508]: INFO:1b7c870763616c6c15fff410@
192.168.100.177:rtpp_command_ul_handle: new session on IPv4 port 15920
created, tag 1aa18fc201a68168;1
Nov 26 23:25:31 rtpproxy[18508]:
INFO:1b7c870763616c6c15fff410@192.168.100.177:rtpp_stream_prefill_addr:
pre-filling caller's RTP address with 192.168.100.177:27360
Nov 26 23:25:31 rtpproxy[18508]: INFO:1b7c870763616c6c15fff410@
192.168.100.177:rtpp_stream_prefill_addr: pre-filling caller's RTCP address
with 192.168.100.177:27361
But x.177 is working on signalling mode only ( Not routing Media ) . As a
result, i m not getting any voice from IP x.179
What can be done to change the caller's RTP address to x.179 in RTPProxy ?
Thanks
--
Regards
===================
Sujit Roy
At kamailio world 2017, Jan Lorenz of Pascom explained how they use
kamailio in a semi-stateless manner and encode the asterisk's IP into the
contact header on the way out so that it can be decoded and used to route
properly on the way back without Record-Routing. I would like to create
such a setup.
I'm looking for pointers if there is a particular module/method that would
be ideal to to use for this. Any other gotcha's to consider in such a
setup. My plan is to keep the transaction on the same kamailio by not
altering the VIA but allow the subsequent in-dialog transactions to
potentially hit another kamailio by changing the contact to a shared SRV
record (and encoding the freeswitch box's IP into it for later retrieval.)
Thanks in advance.
Daniel Greenwald
Hello all,
I've been reading through the dialog module docs again, and there seems to
be a discrepancy in what's suggested in the docs. In the intro, it is
stated that 'To create the dialog associated with an initial INVITE
request, execute the function “dlg_manage()"'. Later on, in section "7.10"
the following example code is provided:
request_route {
...
if(is_method("INVITE") && !has_totag())
{
$dlg_ctx(timeout_route) = "DLGTIMEOUT";
$dlg_ctx(timeout_bye) = 1;
}
dlg_manage();
...
}
In this example code, dlg_manage seems to be called for all requests, as it
is not dependent on the conditional that only requests with no to-tag are
to be handled.
Previously, Daniel had suggested to me in person that one also run
dlg_manage() for CANCELs, and in-dialog reINVITEs, BYEs and ACKs to
mitigate some buggy corner cases. Is this still the case?
What do you guys and gals do in production? Have you had to revise how you
use dlg_manage in terms of calling it for initial INVITEs only vs all
requests? Thanks!
BR,
George
Hi all,
I am trying to place Kamailio between several SIP services which are differentiated by port and by the type of message they handle. To be concrete, here are the services:
Originator:
- reachable on port 5060
- originates all traffic to the services
Service A:
- reachable on port 5061
- handles REGISTER
Service B:
- reachable on port 5062
- handles INVITE
Service C:
- reachable on port 5063
- handles MESSAGE
The services, originator and Kamailio instance may all be run on the same IP or may be split onto different addresses. Previously, the originator needed to know the address and port of each service. Now I want to make Kamailio responsible for that task so it can be done more intelligently.
To start though I simply want to get traffic flowing between the services and this is where I’m struggling to climb the learning curve. In my test setup the originator and all services are on the same IP with only Kamailio running on a different IP.
Address 1 Address 2
========================
Originator <--> Kamailio:6060
|
|
Service A <-------> |
Service B <-------> |
Service C <-------> |
My first attempt at the logic looks like this:
# HOST DEFINITIONS
#!substdef "/HOST_ORIGINATOR/192.168.86.110/"
#!substdef "/HOST_REGISTER/192.168.86.110/“
#!substdef "/HOST_INVITE/192.168.86.110/"
#!substdef "/HOST_MESSAGE/192.168.86.110/"
# PORT DEFINITIONS
#!substdef “/PORT_ORIGINATOR/5060/"
#!substdef "/PORT_REGISTER/5061/“
#!substdef "/PORT_INVITE/5062/"
#!substdef "/PORT_MESSAGE/5063/"
# ROUTE LOGIC
route {
# ORIGINATOR sent us something
if ( $(ct{nameaddr.uri}{uri.port}) == HOST_ORIGINATOR ) {
xlog("L_INFO", "ORIGINATOR: sent $rm\n”);
if (is_method("REGISTER")) {
$du = "sip: HOST_REGISTER:PORT_REGISTER";
xlog("L_INFO", "ORIGINATOR -> REGISTER: Destination URI is now $du\n");
t_relay();
exit;
}
}
…
#### END SNIPPET ####
My very newbie questions are:
- Am I even on the right track here? I understand that t_relay() establishes a stateful dialog handler between the originator and register services.
- Can I accomplish this bi-directional path statelessly with forward()?
- Do I need to add logic to handle the messages from the REGISTER service back to ORIGINATOR?
This config currently fails because of "no corresponding socket found” when the relay triggers. I believe this is because I’m running the Kamailio instance in a Docker container so my first step today is to set up a native install.
I also looked at the dispatcher module which seems very close to what I want to do. Maybe that’s a more natural way to go?
Anyway, apologies for the lengthy explanation. I hope it is at least clear what I intend to do. I will gladly research and do trial and error to solve this but need to know I’m going down roughly the right path. I’m not sure what I should even be googling even of the time :-)
Thanks as always for your time and the great software!
Regards,
-Michael