Hello,
Im having a hard time figuring out how to handle a 302 reidrect, the uac_redirect modules shows a simple configuration. However for me, what it is not doing is changing the 302 back to invite. It is sending the 302 as is on.
if(!t_check_status("3[0-9][0-9]")) {
exit;
}
get_redirects("3:1");
t_relay();
This code just relays the 302 for me. I should add I am using this with the DISPATCHER module so perhaps that has something to do with my issue.
Setup is this, kamailio is sitting between to sip servers, so the flow goes like this, sip_server_a -> kamailio -> sip_server_b. sip_server_b only responds with 302 redirects, sip_server_a does not handle 302’s at all. Kamailio will only get invites from sip_server_a, and the redirects from sip_server_b will only have one contact. How can I get kamailio to reply to sip_server_a’s invite with the updated INVITE?
My config is a mesh of the dispatcher example and uac_redirect example with this specific section handling the redirect:
# Sample failure route
failure_route[RTF_DISPATCH] {
xlog("L_NOTICE", "RTF_DISPATCH: ");
if (t_is_canceled()) {
exit;
}
# next DST - only for 500 or local timeout
if (t_check_status("500")
or (t_branch_timeout() and !t_branch_replied()))
{
if(ds_next_dst())
{
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
}
if (t_check_status("302")) {
xlog("L_NOTICE", "RTF_DISPATCH: 302 ");
if (!get_redirects("1:1")) {
xlog("L_NOTICE", "RTF_DISPATCH: failed to get_redirects ");
t_reply("480", "Temporarily Unavailable");
exit;
}
xlog("L_NOTICE", "RTF_DISPATCH: got redirects ");
t_relay(“sip_server_a”,”5060”);
}
}
Any ideas what I am doing wrong is this supported? Im expecting once I relay this message that it should be an INVITE not a 302 redirect. I cant find any examples of anyone else really doing this.
hello ,
i have installed kamailio 5.7 from debian repo http://deb.kamailio.org/kamailio57 bullseye main
but i dont find the posops module in the directory modules.
what is the exactly package where i can find it.
Thanks.
Hello,
I have the following statement:
if KSR.is_method("INVITE") then
KSR.log("info", "method not allowed " .. KSR.kx.get_method() .."\n");
KSR.x.exit();
end
For some reason, it falls into this condition no matter which method I use, I tried OPTIONS, NOTIFY etc.
log file: <core> [core/kemi.c:152]: sr_kemi_core_log(): method not allowed OPTIONS
the same with this check:
if KSR.is_method_in("I") then
KSR.log("info", "method not allowed " .. KSR.kx.get_method() .."\n");
KSR.x.exit();
end
this is the lua modparam settings:
# ---- lua params ----
modparam("app_lua", "load", "/usr/local/etc/kamailio/main.lua")
modparam("app_lua", "reload", 1)
modparam("app_lua", "log_mode", 1)
cfgengine "lua"
version: kamailio 5.7.0 (x86_64/linux) 1c23c2
Any idea what I'm doing wrong?
Hi members,
I am setting up kamailio as loadbalcer for asterisk server farm with
active-backup conf in Azure cloud using azure loadbalcer, for incoming it
works fine external incoming traffic with nated external IP,
can any one guide how to do active-backup configuration for internal
traffic, as asterisk servers are running on local network.
Thanks and regards
Arqum
Hey All
I have been setting up TLS and websocket for kamailio but i keep getting these errors in the log please can someone help me
Jun 14 20:51:57 so-sbc-02 /usr/sbin/kamailio[25490]: ERROR: tls [tls_util.h:51]: tls_err_ret(): TLS accept:error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher (sni: [sip.domain.com](http://sip.sipalto.com))
Jun 14 20:51:57 so-sbc-02 /usr/sbin/kamailio[25490]: ERROR: tls [tls_server.c:1333]: tls_h_read_f(): src addr: 1.2.3.4.5:57265
Jun 14 20:51:57 so-sbc-02 /usr/sbin/kamailio[25490]: ERROR: tls [tls_server.c:1336]: tls_h_read_f(): dst addr: 5.4.3.2.1:8089Jun 14 20:51:57 so-sbc-02 /usr/sbin/kamailio[25490]: ERROR: <core> [core/tcp_read.c:1478]: tcp_read_req(): ERROR: tcp_read_req: error reading - c: 0x7f3c8fc16720 r: 0x7f3c8fc16848 (-1)
my config is pretty standard so i am not sure what i am missing
using letsencrypt certs
#!ifdef WITH_TLS
# ----- tls params -----
modparam("tls", "tls_method", "TLSv1.2+")
modparam("tls", "certificate", "/etc/kamailio/tls/cert.pem")
modparam("tls", "private_key", "/etc/kamailio/tls/ckey.pem")
modparam("tls", "ca_list", "/etc/kamailio/tls/fullchain.pem")#!endif
Sent with [Proton Mail](https://proton.me/) secure email.
Hello,
I’m in a scenario where i would apply different modification to $tU to User with KEMI, but I can’t achieve it.
I managed to reproduce it with legacy config :
Scenario 1 (both values concatenates):
route[dbg] {
$tU ="aaa";
$tU ="bbb";
}
To: sip:aaabbb@5.5.5.5
Scenario 1 (both values concatenates and @ disapears):
route[dbg] {
$tU ="aaa";
$tU=$null;
$tU ="bbb";
}
To: sip:aaabbb5.5.5.5 --->without @
I tried different combination with [*] as for avps without success, does anyone have an idea about how to perform it ?
Regards,
David
Hi List
Does someone know a function to test a number against the carrierroute
module, to see which route it picked?
My Idea: We have multiple Kamailio-Proxies and I would like to test a
number against all hosts to see where it will be routed, without
performing testcalls.
Regards
Stefan
Hello friends.
I didn't find about it in the documentation, but I will need to update my
database version to MySQL 8.0.32 and I'm using Kamailio version 5.4.
I did some quick tests, and I only needed to adjust the user due to the
authentication mode, and with that, apparently I had no problems.
I would like to know if you are using Kamailio with the latest version of
MySQL, if you have had any problems in production, and if it really is safe
to upgrade.
--
Aviso Legal: Este documento pode conter informações confidenciais e/ou
privilegiadas. Se você não for o destinatário ou a pessoa autorizada a
receber este documento, não deve usar, copiar ou divulgar as informações
nele contidas ou tomar qualquer ação baseada nessas informações.
Disclaimer: The information contained in this document may be privileged
and confidential and protected from disclosure. If the reader of this
document is not the intended recipient, or an employee agent responsible
for delivering this document to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited.
Hi Team
To offer some diagnose functionality I created an API that returns the
location list via JSONRPC
But this creates huge variables.
Jun 12 09:43:32 prod-cpereg02 kamailio[2174548]: ERROR: <core> [core/pvapi.c:1491]: pv_printf_mode(): no more space for spec value - printed:0 token:8599 buffer:8192
Jun 12 09:43:32 prod-cpereg02 kamailio[2174548]: ERROR: <core> [core/pvapi.c:1503]: pv_printf_mode(): buffer overflow -- increase the buffer size...
Already hitting the default limit and not sure this is the right way to
go as we will end up with thousands of registrations.
What is the best way to return larger ammounts of data out of kamailio?
Avoid using the JSONRPC and access the database externally?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________