HI
i m gaurav
i have installed kamailio 5.1.x on Ubuntu server 18.4
when i call from one to another extension , in case of loss network it
disconnect the call or stuck there , how can i make it as re-connection
when network loss , and it will try to reconnect for some seconds like 30
sec
"Example for callingn skype it reconnectcall in case of lossnetwork "
plz help
--
*Regards:*
Gaurav Kumar
I’m working on a custom Kamailio module where I need to send new-dialog and in-dialog requests on timer (hence I’m being forced to generate new messages from C code).
So far I’ve been using modules/tm/tm_load.h defined interface to generate messages and handle callbacks. New dialog messages are sent and processed normally. To do that I’m:
1. Calling set_uac_request() to define request parameters
2. Calling tmb.t_request_outside() to send it outside any existing dialog
I was able to send in-dialog requests (or so I thought) in a similar fashion, but I soon realised that responses to those requests were dropped because they couldn’t be matched against any known existing transaction. I’m attaching log messages that I believe support this theory and I’ve also observed UDP retransmissions.
tm [t_lookup.c:897]: t_reply_matching(): t_reply_matching: hash 50576 label 0 branch 0
tm [t_lookup.c:990]: t_reply_matching(): no matching transaction exists
tm [t_lookup.c:993]: t_reply_matching(): failure to match a transaction
tm [t_lookup.c:1088]: t_check_msg(): msg (0x5abcb50) id=1 global id=1 T end=(nil)
tm [t_reply.c:2195]: reply_received(): transaction not found - (branch -1)
The way I’m currently generating in-dialog requests is very similar to what tmb.t_request_outside() does, the main difference being that I do the dialog setup manually, based on the call-ID, cseq and from/to tags (I’m tracking transaction identifiers separately) and then pass resulting uac_req_t to tmb.t_request_within() - https://gist.github.com/IvanRibakov/3302cb286b1f4b786d109b406f2435a2 <https://gist.github.com/IvanRibakov/3302cb286b1f4b786d109b406f2435a2>
Now, the question part - does anyone know what I’m doing wrong/missing? As I mentioned, when looking at the generated message bodies, they look ok to me (left - initial request that started the dialog, right - first in-dialog request), so I’m guessing I’m missing some Kamailio internal steps needed to register new transaction.
SIP flow (up to the point when first UDP retransmission happens)
I apologise in advance for the bulky question and will be extremely thankful for any guidance.
Regards,
Ivan
Hi,
Looking for some advice running the debugger and setting breakpoints in Kamailio modules such as the SCSCF.
Example: We were trying to watch the authenticate() function:
714 int authenticate(struct sip_msg* msg, char* _realm, char* str2, int is_proxy_auth) {
Our Kamailio 5.2.2 code was compiled and linked from source with the -g option already enabled by default.
We also dropped our Workers to 1 from 16 in the scscf.xml file for the SCSCF to limit the thread count and get the following list of threads below:
We tried the first cdp threads: 8462, 8463, and 8464 and while we could set a break point at line 714 for the authenticate() function, it didn't actually break there at all.
Question:
What pid will we use to catch the authenticate() called during an initial registration from a boghe client?
Anything special we may be missing, gdb related or Kamailio settings?
kamcmd -s /run/kamailio_scscf/kamailio_ctl
kamcmd 1.5
Copyright 2006 iptelorg GmbH
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
kamcmd> ps
8456 main process - attendant
8457 udp receiver child=0 sock=10.0.20.1:6060
8458 slow timer
8459 timer
8460 secondary timer
8461 ctl handler
8462 cdp worker child=0
8463 cdp receiver peer unknown
8464 cdp_receiver_peer=hss522.irisims.org
8465 cdp_acceptor
8466 cdp_timer
8470 notification_worker
8471 notification_worker
8472 notification_worker
8473 notification_worker
8477 JSONRPCS FIFO
8478 JSONRPCS DATAGRAM
Any advice appreciated.
Thanks,
Martin Woscek
Hey guys,
Need help here. What module besides tls.so I need to load in order to get
http_client_query to work?
The module doc says tls.so:
#!ifdef WITH_TLS
loadmodule "tls.so"
#!endif
but I keep getting this when doing config check:
root@ashmaintpsg51:/etc/kamailio# kamailio -c kamailio.cfg
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 322, column 71: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 323, column 45: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 324, column 42: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 325, column 48: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 326, column 44: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 327, column 71: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 328, column 67: Can't set
module parameter
0(12971) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No
module matching <http_client> found
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 329, column 41: Can't set
module parameter
0(12971) ERROR: <core> [core/cfg.y:3309]: yyparse(): cfg. parser: failed
to find command http_client_query (params 2)
0(12971) CRITICAL: <core> [core/cfg.y:3449]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 859, column 105: unknown
command, missing loadmodule?
and I have the package installed on my ubuntu 18.04:
ii kamailio-*tls*-modules:amd64 5.1.2-1ubuntu2
amd64 TLS support for the Kamailio SIP server (authentication,
transport)
thoughts?
--
Andy Chen
Sr. Telephony Lead Engineer
achen@ <achen(a)thinkingphones.com>fuze.com
--
*Confidentiality Notice: The information contained in this e-mail and any
attachments may be confidential. If you are not an intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
e-mail is strictly prohibited. If you have received this e-mail in error,
please notify the sender and permanently delete the e-mail and any
attachments immediately. You should not retain, copy or use this e-mail or
any attachment for any purpose, nor disclose all or any part of the
contents to any other person. Thank you.*
Greetings,
I have two Machines with Kamailio in a High Availability (HA)
configuration. Both machines are active and processing calls and both have
one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1
listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1
NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the
probing is sent for the NAP' my logs get filled with the same error
messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst:
(xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22)
CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid
sendtoparameters#012one possible reason is the server is bound to localhost
and#012attempts to send to the net
ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that
isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without
reducing Log Level to suppress CRITICAL errors?
I think this is a standard High Availability configuration. Is there some
setting that can disable this kind of errors?
Best Regards,
Duarte Rocha
Good morning,
How I can resolve this problem ?
<< ERROR: Could not load the script in
/usr/local/lib64/kamailio//kamctl/kamdbctl.mysql for database engine MYSQL
ERROR: database engine not loaded - tried 'MYSQL' >>
Dear list,
I'm implementing a custom method for user authentication and would like to
kindly ask for some guidance regarding the server side changes that may be
needed in order to keep things running smoothly.
The idea is to replace the standard user/pass-based digest authentication
with a custom one based on Open ID Connect (OIDC) access tokens. I already
have some pieces working (receiving access token in REGISTER message,
validating the token by calling custom python routine, etc.), but I'm
missing the bits needed to keep track of users who have successfully
authenticated.
While looking at sipcomm.cfg I found calls to *www_authenticate* (defined in
modules/auth_db/authorize.c), which in turn calls to *mark_authorized_cred*,
*check_auth_hr* (or *auth_check_hdr_md5*), and
*generate_avps*,. Some of these functions are indeed changing some
values in the DB and/or in memory, and this is where I would like some
guidance.
Is there any documentation I could look at which hopefully explains what DB
values and/or data structures in memory need to be updated in order to keep
track of successfully authenticated users? I believe with this last piece
I'd be able to wrap up my custom authentication implementation.
Thanks in advance!
Regards,
Walter Martín.
Hi everyone,
I'm new to kamailio. I plan to setup a sip server cluster, Does
someone can give me some suggestions if I can use kamailio as front server,
which handle sip message and bypass rtp media
message to backendserver, this mean the kamailio handle only sip message,
the rtp packets are sent directed to backend server.
The sip sequences is
1.softswitch send invite to kamailio
2.kamailio send invite to backend server.
3.backend server return 200 ok to kamailio
4.kamailio return 200 ok to softswitch, the ip and port in sip is from
the backend server's msg, this make the softswitch send rtp direct to
backend server.
5.rtp packets are transfered between softswitch and backend server.
....
6.backend server send bye to kamailio
7.kamailio send bye to softswitch.
Any help is appreciated.
Regards,
Ali Taher
Hello guys,
I have public and private IPs, and i need to force the sending socket
replying to internal out externals endpoint, so i'm using this:
function to check the destination (i tried using $sndto(ip) but it always
returns NULL):
route[CHECK_DEST_NET] {
if ( $du=~"sip:172\..*" ) {
setflag(FLAG_TO_PRIVATE);
xlog("L_ERR", "[CHECK_SOURCE] Packet going to PRIVATE -> [$du]\n" );
} else {
setflag(FLAG_TO_PUBLIC);
xlog("L_ERR", "[CHECK_SOURCE] Packet going to PUBLIC -> [$du]\n" );
}
return;
}
on my relay:
route(CHECK_DEST_NET);
if (isflagset(FLAG_TO_PRIVATE)) {
xlog("L_ERR", "[RELAY] forcing socket to PRIVATE NET\n" );
force_send_socket(LISTEN_INSIDE_IF:LISTEN_INSIDE_PORT);
} else {
xlog("L_ERR", "[RELAY] forcing socket to PUBLIC NET\n" );
force_send_socket(LISTEN_OUTSIDE_IF:LISTEN_OUTSIDE_PORT);
}
This works nicely, except for ACKs and potentially other packets sent
statelessly?
Anyone knows how to fix this?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hello,
I have encountered with problem in Kamailio.
At first glance it looks simple. Considering the Data Lump feature in
Kamailio, All changes in SIP body, does not apply quickly.
So if we are using RTPEngine or RTPProxy, How we can get body message
(Actually IP and port from SDP after rtpengine_manage function) before
relaying message?
Suppose i want get some information and run some extra things before
relying message?
I just added my extra things in t_on_reply block, but it's strange
why it doesn't work before relaying!
-Mojtaba Esfandiari.S