Hello all,
I have two kamailio servers(A and B) with exact same config using the same mysql db. I can register to A but not B. Server B complained:
ERROR: <script>: fu is sip:851968556538527744@104.198.52.31, ru is sip:104.198.52.31, rU is <null>
After capture the udp packet on both server using ngrep, the REGISTER they received are both good except A returns 200 OK and B returns 403 Not relaying.
I don't have a clue what went wrong. How come the $rU is null when all the headers in REGISTER are valid? Can someone please point me the direction?
Thanks
Jesse
Hello guys,
So i've setup kamailio 5 with wss. Registration goes ok, but when trying to
call, SIPML as well as jsSIP send garbage as Contact header, something like:
Contact: <sip:0ku6du26@7j65fcf53i2k.invalid
;transport=ws>;reg-id=1;+sip.instance="<urn:uuid:8b49ac42-2039-4122-9f5b-6f4e9f471f52>";expires=600
so when it passes through:
if (is_method("REGISTER")) {
fix_nated_register();
} else {
if (!add_contact_alias()) {
xlog("L_ERR", "Error aliasing contact <$ct>\n");
sl_send_reply("400", "Bad Request");
exit;
}
}
(taken from several examples i've found around)
add_contact_alias() fails because it tries to find whether the ip address
in the contact header is different from the received ip, and if not, it
adds the received ip as a parameter... so the call doesn't work...
I assume there's a way around this, can anyone help?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
ᐧ
Hi,
for a project I need to make sure, I have a setup where I get
mirror-traffic into Kamailio which has to do something with it. To
work correctly, I need to make sure, the initial INVITE is processed
correctly before any reply to the same call. So I thought I use lock()
and unlock() for it.
This is what the relevant kamailio.cfg part looks like:
request_route {
xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");
route(li);
}
onreply_route {
xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");
route(li);
}
route[magic] {
lock("$ci");
xlog("L_INFO", "Obtained lock, calling lua...\n");
if(!lua_run("handle_packet")) {
xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");
}
unlock("$ci");
xlog("L_INFO", "Lua finished, released lock...\n");
drop;
exit;
}
And this is what the log says:
Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got
new packet INVITE: 172.20.21.247 => 172.20.21.4
Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:
Obtained lock, calling lua...
Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
[app_lua_sr.c:98]: lua_sr_log(): some logging
Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got
new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407
Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:
Obtained lock, calling lua...
Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua
finished, released lock...
Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
[app_lua_sr.c:98]: lua_sr_log(): some more logging
As far as I understand the documentation, the second packet should
wait for the lock on the Call-ID before executing the lua function. So
process 18836 should finish its lua execution before 18837 can do
anything further. Did I completely misunderstand the lock() function?
I'm using Kamailio 5.0.2.
Thanks for helping me understand what Kamailio is doing here.
Best Regards,
Sebastian
Hello
I am using Kamailio 5.0.2, with module drouting to do prefix based routing.
1. When I call do_routing and the prefix is not known, the r-uri remains
unchanged. Is there a way to detect that the prefix is unknown, other than
r-uri remains unchanged ?
2. I have the following parameters
modparam("drouting", "db_url",DBURL)
modparam("drouting", "sort_order", 0)
modparam("drouting", "use_domain", 0)
modparam("drouting", "force_dns", 1)
# modparam("drouting", "enable_keepalive", 1)
If I enable keep alive, I get the following error:
Jun 20 22:37:17 kamailio1 kamailio: ERROR: <core> [core/modparam.c:141]:
set_mod_param_regex(): parameter <enable_keepalive> of type <2> not found
in module <drouting>
yet, the documentation leads me to think that it should work:
*NOTE: this option is only compatible with <em>sort_order</em> 0 currently.
With sort_order value of 1 or 2, destinations status will simply be
ignored.*
Thanks for your help
J.
Hello kamailio users,
I use uac module. Registration and outbound calls from Kamailio are fine.
How can I check if INVITE sent from remote part not spoofed.
Hello,
In my Platform i have a kamailio used as pseudo SBC and a kamailio used as
Proxy (AS trigger) (cpl are applied on this instance). When I make a call
and callee doesn't answer that call my SBC detects the timeout and
generates a 408 to Proxy (according to fr_inv_timer) , but it generates
CANCEL too. Is it possible to deactivate these CANCEL? if not what is the
configuration in order to be able to trigger CFNA?
Regards,
Frédéric
Hi guys,
Anybody knows if evapi sends messages to the clients immediately when
async_relay is called?
The normal behavior is 1 or 2 netstrings per message but I see that
sometimes it starts to enqueue and starts sending for example 4, 5, 15, 30,
52.....327, 645 per message.
Cheers,
Diego
Hello,
I am using fork.cfg file and I want to call a shell script (which has curl commands extracting value from database and returns the value) and use the value in the fork.cfg. How can I do it?
Appreciate your help!
Thanksm
Anu
Hi, all
Is there any way to get remote ip address of both sender($si) and
receiver(?)? I am configuring kamailio with multiple rtpproxy sets.
Basically, rtpproxy set will be choosed based on the country those ip
addresses of caller and callee belong to. Lets say if caller and callee are
both in US, set 1 will selected. If they are not in the same country, set 2
will be selected. I dont know if there is any way to do that.
Best regards
Fisher