Hello!
I have set of Kamailios which distributed location via dmq_usrloc.
Could I construct synthetic DMQ message from separate Kamailio node to this
cluster to get location info for the specific user?
If yes, please explain how to do it.
--
BR,
Denys Pozniak
I’m new to Kamailio and currently evaluating it’s capabilities. One of the things I would like to be able to do is to change outbound message transport based on some dynamic logic.
Kamailio setup: I’m running on a setup from this guide - http://kamailio.org/docs/tutorials/5.1.x/kamailio-install-guide-git/ <http://kamailio.org/docs/tutorials/5.1.x/kamailio-install-guide-git/> and using default configuration file.
In a basic scenario of one2one call, I was able to make Kamailio to forward INVITE to callee over TCP by issuing a REGISTER request with “transport=tcp” parameter. Although it worked, as far as I understand that means all communication with the callee will be happening over TCP. I would like to be able to change transport dynamically so looking for a way to do that from config file.
I tried modifying $ru/$du in the following manner, but it didn’t seem to work.
# default config content
if (is_method("INVITE")) {
setflag(FLT_ACC); # do accounting
# added to try to force TCP transport
$du = $du + ";transport=tcp";
}
Any pointers as to how can I modify the outbound message transport? Do I need to use some extra modules or can it be achieved with a basic setup?
Thanks in advance,
Ivan
Hi,
So, route[REGISTRAR_1] will, when the max_contacts is reached, reply to the endpoint with a 503 error containing a "P-Registrar-Error: Too many registered contacts" header - this seems wrong to me so I've tried to work around it with route[REGISTRAR_2] which returns the right response, but, also writes "INFO: registrar [save.c:615]: test_max_contacts(): too many contacts for AOR" to the log file, which is messy.
Does anyone have any pointers for doing this better?
Thanks,
Dan
route[REGISTRAR_1] {
if ( is_method("REGISTER") ) {
if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
setbflag(FLB_NATSIPPING);
}
if ($avp(maximum_contacts) != $null) {
$xavp(reg=>max_contacts) = $avp(maximum_contacts);
}
save("location");
}
return;
}
route[REGISTRAR_2] {
if ( is_method("REGISTER") ) {
if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
setbflag(FLB_NATSIPPING);
}
if ($avp(maximum_contacts) != $null) {
$xavp(reg=>max_contacts) = $avp(maximum_contacts);
}
save("location", "0x02");
switch ($retcode) {
case -1:
sl_send_reply("500", "Server Internal Error");
exit;
case -2:
sl_send_reply("403", "Forbidden");
exit;
};
sl_send_reply("200", "OK");
}
return;
}
Hello,
I'm trying to replicate active dialogs using the DMQ module. I see the
dialogs on the other nodes but it generates a error message in the logs on
all the nodes:
Sep 27 10:17:31 sip04 /usr/sbin/kamailio[27367]: CRITICAL: dialog
[dlg_timer.c:130]: insert_dlg_timer(): Trying to insert a bogus dlg
tl=0x7efdca1bebf8 tl->next=0x7efdca14cb80 tl->prev=0x7efdca14cb80
Sep 27 10:17:31 sip04 /usr/sbin/kamailio[27367]: CRITICAL: dialog
[dlg_dmq.c:309]: dlg_dmq_handle_msg(): Unable to insert dlg timer
0x7efdca1beb98 [2643:3725]
Even with the timeout_avp option disabled i still see the error messages. I
tested this on kamailio 5.0.3 and 5.1.3 with the same results.
With debug enabled i see the correct data is replicated to the other nodes:
dlg_dmq_replicate_action(): sending serialized data
{"action":2,"h_entry":1328,"h_id":409,"state":4,"start_ts":1538036606,"lifetime":7200,"tag1":"1635359980","tag2":"as2d80799c","cseq1":"21","cseq2":"0","route_set1":"","route_set2":"","contact1":"sip:sipuser@10.10.10.10:1057
;alias=10.10.10.10~1055~1","contact2":"sip:+31101234567@10.10.10.10:5060"}
"lifetime":7200 is in the serialized data, and when i check on the other
node with "kamcmd dlg.list" i see that the lifetime data is not updated.
Thanks,
Jan
Hello
I want the registar module to lookup a user with a different 'name' as the RURI.
We have the extension & domain in variables, but the RURI is ext@ip-of-server, e.g. 200(a)1.1.1.1<mailto:200@1.1.1.1>, while we want to perform the lookup for 200(a)somedomain.tld<mailto:200@somedomain.tld>. We have somedomain.tld in a header, so we have it in a variable.
However, if we perform the lookup like this (using Python module):
lookup_result = KSR.registrar.lookup('location')
We get a negative result, and the debug logs show that it tries to locate 200(a)1.1.1.1<mailto:200@1.1.1.1> - which makes sense.
So according to docs you can specify an URI, however when I do this:
lookup_result = KSR.registrar.lookup('location' '200(a)somedomain.tld')
lookup_result is "False" and the function is not executed, according to docs because it cannot obtain the parameters for this function.
How can we force the registrar module to lookup a different user?
Hello,
I have a issue with setting the dialog timeout for a call. It works fine
until i receive a re-INVITE. The re-INVITE seems to reset the dialog
timeout back to the default value configured in the module parameters
(7200 in my case).
I use "dlg_set_timeout("900");" to set the timeout to 900 seconds. When
i receive a re-INVITE i see the following in the debug logs:
DEBUG: dialog [dlg_handlers.c:647]: get_dlg_timeout(): invalid AVP
value, using default timeout
This happens even with the "timeout_avp" module parameter disabled. I'm
running kamailio 5.1.3.
Thanks,
Jan
Good day all
I hope Im on the right place to ask the question.
Im a newbie to kamailio and have a little problem understanding how to set
kamailio correctly.
Scenario:
VoIP Supplier (IP:161.161.252.20{Private Net}) à Connect via routing to
Kamailio Server(155.155.16.2 eno2{private Net}),Kamailio
Server(187.221.197.252 eno1{public facing})àconnect to PBX(public IP set in
dispatcher) à connect to RTP server(Public IP)
Now the problem is that if you call in Number(a)161.161.252.20
<mailto:Number@161.161.252.20> is send to kamailio, kamailio then sends it
down to dispatcher IP and that PBX responds directly back via rtp server to
161.161.252.20. The 161.161.252.20 IP is private and cannot be reached from
the cloud and vice versa . How do I get kamailio to be the middle man
between 161.161.252.20 and RTP server(all traffic must go via the kamailio
server) Is there specific modules I must load.
Im running Kamailio 4.4
Any help would be muchly appreciated.
Regards
Pieter
Hello,
as a result of collaborative work at Kamailio Developers Meeting, we
succeeded to merge the two existing module exports interface (one for
kamailio modules and the other one from ser modules) in a single one.
All public modules were updated, but if you have any private module then
you have to update as well in order to get it compiled with the latest
master. Just look at one of the modules (e.g., sl is a good option) and
all the fields in mod exports structure have comments with their meaning.
In short: we removed unused fields for statistics, mi commands and
extra-processes (from kamailio old interface) and oncancel (from ser old
interface), kept the rpc exports from ser interface and pv exports and
dlopen flags from kamailio interface. The other fields were common in
both interfaces, but be aware that order was also changed.
If you have a module implementing the old ser interface, you also need
to add the free_fixup_field in functions exports tructure -- you can
just set it to 0.
With this we have now a single mod exports interface in all modules, the
core is also cleaner as we got rid of the various compatibility layers.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
Hello,
we will do some maintenance work on deb.kamailio.org server these days
in order to move to a better infrastructure, so it may not be available
for a while -- the DNS needs to be updated as well, this also can affect
you if your router/provider does caching.
Once we finish with the migration, we will send updates.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com