sr-dev
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
November 2023
- 15 participants
- 403 discussions
[kamailio/kamailio] misc: examples; ims: Update kamailio.cfg example to function out of the box on current releases (#2203)
by Nick 26 Nov '25
by Nick 26 Nov '25
26 Nov '25
Changes to example files for PCSCF in misc/examples/ims to make funcitional with current stable version.
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Changes to example files for PCSCF in misc/examples/ims to make funcitional with current stable version.
Changes:
- Loading IPsec module prior to IMS Usrloc PCSCF (Now required)
- removed modparam("ims_usrloc_pcscf", "hashing_type", 2) from example (This parameter was removed some time ago)
- Fix to formatting of single MySQL connection to work in current version
- Bind to any IP by default
- Dispatcher parameters only loaded if required
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2203
-- Commit Summary --
* misc: examples: IMS PCSCF kamailio.cfg update
* misc: examples: IMS PCSCF pcscf.cfg update
-- File Changes --
M misc/examples/ims/pcscf/kamailio.cfg (6)
M misc/examples/ims/pcscf/pcscf.cfg.sample (12)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2203.patch
https://github.com/kamailio/kamailio/pull/2203.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2203
3
4
11 Sep '25
ITNOA
### Description
I try to connect Kamailio and Freeswitch together, and initiate call from Zoiper5 soft phone through Kamailio
My Kamailio config is below
```
#!ifdef ACCDB_COMMENT
ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default '';
ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL default '';
ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
#!endif
####### Include Local Config If Exists #########
import_file "kamailio-local.cfg"
####### Defined Values #########
# *** Value defines - IDs used later in config
#!ifdef WITH_DEBUG
#!define DBGLEVEL 3
#!else
#!define DBGLEVEL 2
#!endif
#!ifdef WITH_MYSQL
# - database URL - used to connect to database server by modules such
# as: auth_db, acc, usrloc, a.s.o.
#!trydef DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"
#!endif
#!ifdef WITH_MULTIDOMAIN
# - the value for 'use_domain' parameters
#!define MULTIDOMAIN 1
#!else
#!define MULTIDOMAIN 0
#!endif
# - flags
# FLT_ - per transaction (message) flags
# FLB_ - per branch flags
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define FLT_NATS 5
#!define FLB_NATB 6
#!define FLB_NATSIPPING 7
####### Global Parameters #########
/* LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR, ... */
debug=DBGLEVEL
/* set to 'yes' to print log messages to terminal or use '-E' cli option */
log_stderror=yes
memdbg=5
memlog=5
log_facility=LOG_LOCAL0
log_prefix="{$mt $hdr(CSeq) $ci} "
/* number of SIP routing processes for each UDP socket
* - value inherited by tcp_children and sctp_children when not set explicitely */
children=8
/* uncomment the next line to disable TCP (default on) */
disable_tcp=yes
/* number of SIP routing processes for all TCP/TLS sockets */
# tcp_children=8
/* uncomment the next line to disable the auto discovery of local aliases
* based on reverse DNS on IPs (default on) */
auto_aliases=no
/* add local domain aliases - it can be set many times */
# alias="sip.mydomain.com"
/* listen sockets - if none set, Kamailio binds to all local IP addresses
* - basic prototype (full prototype can be found in Wiki - Core Cookbook):
* listen=[proto]:[localip]:[lport] advertise [publicip]:[pport]
* - it can be set many times to add more sockets to listen to */
listen=udp:172.28.72.99:5060 advertise 172.28.72.99:5060
#listen=tcp:172.28.72.99:5060
/* life time of TCP connection when there is no traffic
* - a bit higher than registration expires to cope with UA behind NAT */
tcp_connection_lifetime=3605
/* upper limit for TCP connections (it includes the TLS connections) */
tcp_max_connections=2048
#!ifdef WITH_JSONRPC
tcp_accept_no_cl=yes
#!endif
#!ifdef WITH_TLS
enable_tls=no
/* upper limit for TLS connections */
tls_max_connections=2048
#!endif
/* set it to yes to enable sctp and load sctp.so module */
enable_sctp=no
####### Custom Parameters #########
/* These parameters can be modified runtime via RPC interface
* - see the documentation of 'cfg_rpc' module.
*
* Format: group.id = value 'desc' description
* Access: $sel(cfg_get.group.id) or @cfg_get.group.id */
#!ifdef WITH_PSTN
/* PSTN GW Routing
*
* - pstn.gw_ip: valid IP or hostname as string value, example:
* pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
*
* - by default is empty to avoid misrouting */
pstn.gw_ip = "" desc "PSTN GW Address"
pstn.gw_port = "" desc "PSTN GW Port"
#!endif
#!ifdef WITH_VOICEMAIL
/* VoiceMail Routing on offline, busy or no answer
*
* - by default Voicemail server IP is empty to avoid misrouting */
voicemail.srv_ip = "" desc "VoiceMail IP Address"
voicemail.srv_port = "5060" desc "VoiceMail Port"
#!endif
####### Modules Section ########
/* set paths to location of modules */
# mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
#!ifdef WITH_MYSQL
loadmodule "db_mysql.so"
#!endif
#!ifdef WITH_JSONRPC
loadmodule "xhttp.so"
#!endif
loadmodule "jsonrpcs.so"
loadmodule "kex.so"
loadmodule "corex.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "textopsx.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "acc.so"
loadmodule "counters.so"
#!ifdef WITH_AUTH
loadmodule "auth.so"
loadmodule "auth_db.so"
#!ifdef WITH_IPAUTH
loadmodule "permissions.so"
#!endif
#!endif
#!ifdef WITH_ALIASDB
loadmodule "alias_db.so"
#!endif
#!ifdef WITH_SPEEDDIAL
loadmodule "speeddial.so"
#!endif
#!ifdef WITH_MULTIDOMAIN
loadmodule "domain.so"
#!endif
#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
#!endif
#!ifdef WITH_NAT
loadmodule "nathelper.so"
#!ifdef WITH_RTPENGINE
loadmodule "rtpengine.so"
#!else
loadmodule "rtpproxy.so"
#!endif
#!endif
#!ifdef WITH_TLS
loadmodule "tls.so"
#!endif
#!ifdef WITH_ANTIFLOOD
loadmodule "htable.so"
loadmodule "pike.so"
#!endif
#!ifdef WITH_DEBUG
loadmodule "debugger.so"
#!endif
# ----------------- setting module-specific parameters ---------------
# ----- jsonrpcs params -----
modparam("jsonrpcs", "pretty_format", 1)
/* set the path to RPC fifo control file */
# modparam("jsonrpcs", "fifo_name", "/run/kamailio/kamailio_rpc.fifo")
/* set the path to RPC unix socket control file */
# modparam("jsonrpcs", "dgram_socket", "/run/kamailio/kamailio_rpc.sock")
#!ifdef WITH_JSONRPC
modparam("jsonrpcs", "transport", 7)
#!endif
# ----- ctl params -----
/* set the path to RPC unix socket control file */
# modparam("ctl", "binrpc", "unix:/run/kamailio/kamailio_ctl")
# ----- sanity params -----
modparam("sanity", "autodrop", 0)
# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)
# ----- rr params -----
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 0)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)
# ----- registrar params -----
modparam("registrar", "method_filtering", 1)
/* uncomment the next line to disable parallel forking via location */
# modparam("registrar", "append_branches", 0)
/* uncomment the next line not to allow more than 10 contacts per AOR */
# modparam("registrar", "max_contacts", 10)
/* max value for expires of registrations */
modparam("registrar", "max_expires", 3600)
/* set it to 1 to enable GRUU */
modparam("registrar", "gruu_enabled", 0)
/* set it to 0 to disable Path handling */
modparam("registrar", "use_path", 1)
/* save Path even if not listed in Supported header */
modparam("registrar", "path_mode", 0)
# ----- acc params -----
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
/* by default ww do not adjust the direct of the sequential requests.
* if you enable this parameter, be sure the enable "append_fromtag"
* in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
/* enhanced DB accounting */
#!ifdef WITH_ACCDB
modparam("acc", "db_flag", FLT_ACC)
modparam("acc", "db_missed_flag", FLT_ACCMISSED)
modparam("acc", "db_url", DBURL)
modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
#!endif
# ----- usrloc params -----
modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "timer_procs", 1)
modparam("usrloc", "use_domain", MULTIDOMAIN)
/* enable DB persistency for location entries */
#!ifdef WITH_USRLOCDB
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 2)
#!endif
# ----- auth_db params -----
#!ifdef WITH_AUTH
modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "load_credentials", "")
modparam("auth_db", "use_domain", MULTIDOMAIN)
# ----- permissions params -----
#!ifdef WITH_IPAUTH
modparam("permissions", "db_url", DBURL)
modparam("permissions", "db_mode", 1)
#!endif
#!endif
# ----- alias_db params -----
#!ifdef WITH_ALIASDB
modparam("alias_db", "db_url", DBURL)
modparam("alias_db", "use_domain", MULTIDOMAIN)
#!endif
# ----- speeddial params -----
#!ifdef WITH_SPEEDDIAL
modparam("speeddial", "db_url", DBURL)
modparam("speeddial", "use_domain", MULTIDOMAIN)
#!endif
# ----- domain params -----
#!ifdef WITH_MULTIDOMAIN
modparam("domain", "db_url", DBURL)
/* register callback to match myself condition with domains list */
modparam("domain", "register_myself", 1)
#!endif
#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
#!endif
#!ifdef WITH_NAT
#!ifdef WITH_RTPENGINE
# ----- rtpengine params -----
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223")
#!else
# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
#!endif
# ----- nathelper params -----
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "sip:pinger@kamailio.org")
# params needed for NAT traversal in other modules
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)
#!endif
#!ifdef WITH_TLS
# ----- tls params -----
modparam("tls", "config", "/etc/kamailio/tls.cfg")
#!endif
#!ifdef WITH_ANTIFLOOD
# ----- pike params -----
modparam("pike", "sampling_time_unit", 2)
modparam("pike", "reqs_density_per_unit", 16)
modparam("pike", "remove_latency", 4)
# ----- htable params -----
/* ip ban htable with autoexpire after 5 minutes */
modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")
#!endif
#!ifdef WITH_DEBUG
# ----- debugger params -----
modparam("debugger", "cfgtrace", 1)
modparam("debugger", "log_level_name", "exec")
#!endif
####### Routing Logic ########
/* Main SIP request routing logic
* - processing of any incoming SIP request starts with this route
* - note: this is the same as route { ... } */
request_route {
# per request initial checks
# route(REQINIT);
# NAT detection
#route(NATDETECT);
# CANCEL processing
if (is_method("CANCEL")) {
if (t_check_trans()) {
route(RELAY);
}
exit;
}
# handle retransmissions
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
if (is_method("REGISTER")) {
xdbg("request from gggggggggggggggggggggggggggggggggggggggggg - $rm from $fu (IP:$si:$sp)\n");
}
rewritehostport("172.28.69.52:5060");
# handle requests within SIP dialogs
# route(WITHINDLG);
### only initial requests (no To tag)
# authentication
# route(AUTH);
# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
#remove_hf("Route");
#if (is_method("INVITE|SUBSCRIBE")) {
# record_route();
#}
# account only INVITEs
#if (is_method("INVITE")) {
# setflag(FLT_ACC); # do accounting
#}
# dispatch requests to foreign domains
#route(SIPOUT);
### requests for my local domains
# handle presence related requests
#route(PRESENCE);
# handle registrations
# route(REGISTRAR);
#if ($rU==$null) {
# # request with no Username in RURI
# sl_send_reply("484","Address Incomplete");
# exit;
#}
# dispatch destinations to PSTN
#route(PSTN);
# user location service
#route(LOCATION);
}
# Wrapper for relaying requests
route[RELAY] {
# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
}
if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
}
if (is_method("INVITE")) {
if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
}
if (!t_relay()) {
sl_reply_error();
}
exit;
}
# Per SIP request initial checks
route[REQINIT] {
# no connect for sending replies
set_reply_no_connect();
# enforce symmetric signaling
# - send back replies to the source address of request
force_rport();
#!ifdef WITH_ANTIFLOOD
# flood detection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself) {
if($sht(ipban=>$si)!=$null) {
# ip is already blocked
xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");
exit;
}
if (!pike_check_req()) {
xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");
$sht(ipban=>$si) = 1;
exit;
}
}
#!endif
if($ua =~ "friendly|scanner|sipcli|sipvicious|VaxSIPUserAgent") {
# silent drop for scanners - uncomment next line if want to reply
# sl_send_reply("200", "OK");
exit;
}
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if(is_method("OPTIONS") && uri==myself && $rU==$null) {
sl_send_reply("200","Keepalive");
exit;
}
if(!sanity_check("17895", "7")) {
xlog("Malformed SIP request from $si:$sp\n");
exit;
}
}
# Handle requests within SIP dialogs
route[WITHINDLG] {
if (!has_totag()) return;
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
route(DLGURI);
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
} else if ( is_method("ACK") ) {
# ACK is forwarded statelessly
route(NATMANAGE);
} else if ( is_method("NOTIFY") ) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
exit;
}
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
route(RELAY);
exit;
} else {
# ACK without matching transaction ... ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
exit;
}
# Handle SIP registrations
route[REGISTRAR] {
if (!is_method("REGISTER")) return;
if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
#!ifdef WITH_NATSIPPING
# do SIP NAT pinging
setbflag(FLB_NATSIPPING);
#!endif
}
if (!save("location")) {
sl_reply_error();
}
exit;
}
# User location service
route[LOCATION] {
#!ifdef WITH_SPEEDDIAL
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$") {
if(sd_lookup("speed_dial")) {
route(SIPOUT);
}
}
#!endif
#!ifdef WITH_ALIASDB
# search in DB-based aliases
if(alias_db_lookup("dbaliases")) {
route(SIPOUT);
}
#!endif
$avp(oexten) = $rU;
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}
# when routing via usrloc, log the missed calls also
if (is_method("INVITE")) {
setflag(FLT_ACCMISSED);
}
route(RELAY);
exit;
}
# Presence server processing
route[PRESENCE] {
if(!is_method("PUBLISH|SUBSCRIBE")) return;
if(is_method("SUBSCRIBE") && $hdr(Event)=="message-summary") {
route(TOVOICEMAIL);
# returns here if no voicemail server is configured
sl_send_reply("404", "No voicemail service");
exit;
}
#!ifdef WITH_PRESENCE
#!ifdef WITH_MSGREBUILD
# apply changes in case the request headers or body were modified
msg_apply_changes();
#!endif
if (!t_newtran()) {
sl_reply_error();
exit;
}
if(is_method("PUBLISH")) {
handle_publish();
t_release();
} else if(is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
}
exit;
#!endif
# if presence enabled, this part will not be executed
if (is_method("PUBLISH") || $rU==$null) {
sl_send_reply("404", "Not here");
exit;
}
return;
}
# IP authorization and user authentication
route[AUTH] {
#!ifdef WITH_AUTH
#!ifdef WITH_IPAUTH
if((!is_method("REGISTER")) && allow_source_address()) {
# source IP allowed
return;
}
#!endif
if (is_method("REGISTER") || from_uri==myself) {
# authenticate requests
if (!auth_check("$fd", "subscriber", "1")) {
auth_challenge("$fd", "0");
exit;
}
# user authenticated - remove auth header
if(!is_method("REGISTER|PUBLISH"))
consume_credentials();
}
# if caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (from_uri!=myself && uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
#!else
# authentication not enabled - do not relay at all to foreign networks
if(uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
#!endif
return;
}
# Caller NAT detection
route[NATDETECT] {
#!ifdef WITH_NAT
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
if(is_first_hop()) {
set_contact_alias();
}
}
setflag(FLT_NATS);
}
#!endif
return;
}
# RTPProxy control and signaling updates for NAT traversal
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;
#!ifdef WITH_RTPENGINE
if(nat_uac_test("8")) {
rtpengine_manage("replace-origin replace-session-connection");
} else {
rtpengine_manage("trust-address replace-origin replace-session-connection");
}
#!else
if(nat_uac_test("8")) {
rtpproxy_manage("co");
} else {
rtpproxy_manage("cor");
}
#!endif
if (is_request()) {
if (!has_totag()) {
if(t_is_branch_route()) {
add_rr_param(";nat=yes");
}
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
if(is_first_hop())
set_contact_alias();
}
}
if(isbflagset(FLB_NATB)) {
# no connect message in a dialog involving NAT traversal
if (is_request()) {
if(has_totag()) {
set_forward_no_connect();
}
}
}
#!endif
return;
}
# URI update for dialog requests
route[DLGURI] {
#!ifdef WITH_NAT
if(!isdsturiset()) {
handle_ruri_alias();
}
#!endif
return;
}
# Routing to foreign domains
route[SIPOUT] {
if (uri==myself) return;
append_hf("P-Hint: outbound\r\n");
route(RELAY);
exit;
}
# PSTN GW routing
route[PSTN] {
#!ifdef WITH_PSTN
# check if PSTN GW IP is defined
if (strempty($sel(cfg_get.pstn.gw_ip))) {
xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip not defined\n");
return;
}
# route to PSTN dialed numbers starting with '+' or '00'
# (international format)
# - update the condition to match your dialing rules for PSTN routing
if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$")) return;
# only local users allowed to call
if(from_uri!=myself) {
sl_send_reply("403", "Not Allowed");
exit;
}
# normalize target number for pstn gateway
# - convert leading 00 to +
if (starts_with("$rU", "00")) {
strip(2);
prefix("+");
}
if (strempty($sel(cfg_get.pstn.gw_port))) {
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
} else {
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":"
+ $sel(cfg_get.pstn.gw_port);
}
route(RELAY);
exit;
#!endif
return;
}
# JSONRPC over HTTP(S) routing
#!ifdef WITH_JSONRPC
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if(src_ip!=127.0.0.1) {
xhttp_reply("403", "Forbidden", "text/html",
"<html><body>Not allowed from $si</body></html>");
exit;
}
if ($hu =~ "^/RPC") {
jsonrpc_dispatch();
exit;
}
xhttp_reply("200", "OK", "text/html",
"<html><body>Wrong URL $hu</body></html>");
exit;
}
#!endif
# Routing to voicemail server
route[TOVOICEMAIL] {
#!ifdef WITH_VOICEMAIL
if(!is_method("INVITE|SUBSCRIBE")) return;
# check if VoiceMail server IP is defined
if (strempty($sel(cfg_get.voicemail.srv_ip))) {
xlog("SCRIPT: VoiceMail routing enabled but IP not defined\n");
return;
}
if(is_method("INVITE")) {
if($avp(oexten)==$null) return;
$ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_port);
} else {
if($rU==$null) return;
$ru = "sip:" + $rU + "@" + $sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_port);
}
route(RELAY);
exit;
#!endif
return;
}
# Manage outgoing branches
branch_route[MANAGE_BRANCH] {
xdbg("new branch [$T_branch_idx] to $ru\n");
route(NATMANAGE);
}
# Manage incoming replies
reply_route {
if(!sanity_check("17604", "6")) {
xlog("Malformed SIP response from $si:$sp\n");
drop;
}
}
# Manage incoming replies in transaction context
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(status=~"[12][0-9][0-9]") {
route(NATMANAGE);
}
}
# Manage failure routing cases
failure_route[MANAGE_FAILURE] {
route(NATMANAGE);
if (t_is_canceled()) exit;
#!ifdef WITH_BLOCK3XX
# block call redirect based on 3xx replies.
if (t_check_status("3[0-9][0-9]")) {
t_reply("404","Not found");
exit;
}
#!endif
#!ifdef WITH_BLOCK401407
# block call redirect based on 401, 407 replies.
if (t_check_status("401|407")) {
t_reply("404","Not found");
exit;
}
#!endif
#!ifdef WITH_VOICEMAIL
# serial forking
# - route to voicemail on busy or no answer (timeout)
if (t_check_status("486|408")) {
$du = $null;
route(TOVOICEMAIL);
exit;
}
#!endif
}
```
As you can see I just one thing in `request_route`
```
request_route {
# per request initial checks
# route(REQINIT);
# NAT detection
#route(NATDETECT);
# CANCEL processing
if (is_method("CANCEL")) {
if (t_check_trans()) {
route(RELAY);
}
exit;
}
# handle retransmissions
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
if (is_method("REGISTER")) {
xdbg("request from gggggggggggggggggggggggggggggggggggggggggg - $rm from $fu (IP:$si:$sp)\n");
}
rewritehostport("172.28.69.52:5060");
```
The `172.28.69.52` is ip of my Freeswitch
After I try to call from Zoiper5, I get below error in Kamailio log and Zoiper does not work.
```
4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
```
### Troubleshooting
#### Reproduction
* pull official Kamailio docker image `kamailio/kamailio 5.4.6-buster`
* then run below command
```
docker run --net=host --name kamailio \
-v /home/ssoroosh/kamailio:/etc/kamailio \
kamailio/kamailio:5.4.6-buster
```
#### Debugging Data
I do not have any debug data
#### Log Messages
```
Listening on
udp: 172.28.72.99 [172.28.72.99]:5060 advertise 172.28.72.99:5060
Aliases:
0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available
0(1) INFO: <core> [main.c:2919]: main(): processes (at least): 16 - shm size: 67108864 - pkg size: 8388608
0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
13(19) INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/19
15(21) INFO: ctl [io_listener.c:210]: io_listen_loop(): io_listen_loop: using epoll_lt as the io watch method (auto detected)
2(8) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
2(8) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
2(8) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<�>
2(8) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
4(10) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
4(10) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
1(7) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
1(7) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
1(7) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
1(7) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
3(9) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
3(9) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
3(9) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
3(9) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
5(11) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
5(11) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
8(14) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
8(14) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
8(14) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
8(14) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
1(7) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
1(7) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
1(7) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
1(7) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
5(11) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
5(11) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
4(10) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
4(10) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
5(11) INFO: <core> [core/parser/parse_fline.c:156]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
5(11) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 0)
5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
6(12) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
6(12) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<�>
6(12) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
7(13) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
7(13) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
7(13) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
8(14) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
8(14) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
8(14) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
2(8) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
2(8) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
2(8) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
4(10) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
1(7) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
1(7) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
1(7) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
3(9) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
3(9) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
3(9) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
5(11) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
6(12) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
6(12) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
6(12) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
7(13) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 41)
7(13) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR: parse_msg: message=<��>
7(13) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP message failed (172.28.64.1:51370/1)
```
#### SIP Traffic
My pcap is attached
[sip.zip](https://github.com/kamailio/kamailio/files/8326814/sip.zip)
### Possible Solutions
I have not any solution yet.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.6 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 8.3.0
```
* **Operating System**:
```
Linux master 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 GNU/Linux
root@master:/home# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3062
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3062(a)github.com>
3
4
[kamailio/kamailio] Writing to $fU or $tU appends to header user (Issue #3165)
by Benoît Panizzon 24 Jun '25
by Benoît Panizzon 24 Jun '25
24 Jun '25
Dear Gang
Possibly @oej could provide more in-depth information as he has witnessed this issue.
Usually the user of the from URI is the phone number displayed at the destination. There are situations where this phone number is translated.
As example. In Switzerland, the user is used to see numbers in a local format. National number starting with 0 and international numbers with 00 but on interconnection between telcos, e164 is used.
So basically when a call is sent to a customer '+41' is replaced by '0' and '+' is replaced by '00'.
Let's start with an example From: header:
`From: "Maurice Moss" <sip:+41991234567@example.com>;user=phone`
So shortly before the call is sent out to the location of the registered CPE, this is done:
```
if ($fU =~ "^\+41") {
$fU = "0" + $(fU{s.substr,3,0});
} else if ($fU = ~ "^\+") {
$fU = "00" + $(fU{s.substr,1,0});
}
```
What is sent to the CPE now looks like this:
`From: "Maurice Moss" <sip:0991234567@example.com>;user=phone`
Now we hit an error like 486 BUSY and the destination has call forwarding active to a mobile phone on another TSP. So we have to send the call out back the IC and numbers need to be translated back to e164.
We handle this in a failure route, which in turn could trigger a branch route.
So we revert the number back to e164:
`$fU = "+41" + $(fU{s.substr,1,0});`
Expected outcome:
`From: "Maurice Moss" <sip:+41991234567@example.com>;user=phone`
Observed outcome:
`From: "Maurice Moss" <sip:0991234567+41991234567@example.com>;user=phone`
So setting $fU more than once is appending to the user element of the From header URI.
This behavior has not been found in any documentation.
I have been working around most of the issues by making sure I change $fU (and $tU) at the latest possible time and only once. But in the case described above, I have not been able to come up with a work-around yet.
I also can't think of any benefit of the way those PV are handled or any harm that could be done, to handle them differently and make the last 'write' overwrite and previous value, instead of appending.
Thank you for looking into this.
-Benoît-
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3165
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3165(a)github.com>
3
4
[kamailio/kamailio] Inactive video stream: can't find media IP in the message (Issue #3406)
by schoberw 31 May '25
by schoberw 31 May '25
31 May '25
### Description
In some situations the other side UA must reply with an inactive media stream. E.g. if video was added but not supported by the other side. The UAS then must answer with an m=video 0 RTP/.. line.
It seams that the video section must contain a c= line with an IP address for rtpengine to function. If there is no c line (no IP address) the SDP body cannot be parsed and thus no RTP proxy is invoked.
### Troubleshooting
Not easy to reproduce since the answer must bei "wrong". Is it correct to reply an SDP body (media = video) like this?
```
m=video 0 RTP/AVPF 96
a=label:1
a=inactive
a=mid:1
```
Maybe not (but Audiocodes SBC lates LTS version does it) - so we are dependent on other side now that this service works.
#### Reproduction
reInvite with Video to a UA that has no video Support (e.g. Bria -> Snom). Drop the c line in the video part with some textops in 200 OK (just to reproduce of course).
A -> B, connect the call
A -> + video, B has no video support
A presses hold
#### Log Messages
Incoming 200 OK after doing hold with an inactive video:
```
v=0
o=root 436040161 309284577 IN IP4 1.2.3.5
s=call
t=0 0
m=audio 14200 RTP/AVPF 9 8 126
c=IN IP4 1.2.3.5
a=ptime:20
a=recvonly
a=mid:0
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-15
m=video 0 RTP/AVPF 96
a=label:1
a=inactive
a=mid:1
Mar 27 17:52:22 c5p05es2-1 /usr/sbin/kamailio[2938205]: ERROR: <core> [core/parser/sdp/sdp.c:490]: parse_sdp_session(): can't find media IP in the message
Mar 27 17:52:22 c5p05es2-1 /usr/sbin/kamailio[2938205]: INFO: <script>: >>> Sending Reply: 200 OK (1.2.3.4:443 -> 100.108.48.38:65251)
```
Compare to working SDP parsing:
```
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-15
m=video 0 RTP/AVP 96
c=IN IP4 1.2.3.5
a=inactive
a=mid:1
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: ONREPLY_ROUTE[FORWARD]
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: ROUTE[RTPP_REPLY]
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: > 200 with video
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: > 200 with inactive video
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: > Remove inactive video
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: > Answer to WebRTC client: 200 - qijpuibkv6ufhnd282ks
Mar 27 18:00:17 c5p05es2-1 /usr/sbin/kamailio[2942881]: INFO: <script>: >>> Sending Reply: 200 OK (91.237.65.14:443 -> 80.108.48.38:65388)
```
### Possible Solutions
Tried to fix in script:
```
if(sdp_with_media("video")) xlog("L_INFO", "> $rs with video");
if(sdp_with_active_media("video")) xlog("L_INFO", "> $rs with active video");
if(!sdp_with_active_media("video")) xlog("L_INFO", "> $rs with inactive video");
if(sdp_with_media("video") && !sdp_with_active_media("video")) {
# try fix for RMT#60189
xlog("L_INFO", "> Remove inactive video");
sdp_remove_media("video");
msg_apply_changes(); # needed?
}
```
But since sdpops cannot parse it cannot remove the buggy media, too. See the log: non of the xlog is logging.
If there is inactive media the c line is not mandatory. The parser should accept this by adding a default IP of 0.0.0.0, if needed
Doing tricks with textops is not a easy nor performant solution to accept this wrong SDP from other parties.
### Additional Information
```
version: kamailio 5.6.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 10.2.1
```
* **Operating System**:
Debian Bullseye
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3406
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3406(a)github.com>
3
5
[kamailio/kamailio] clean_sa(): Error sending delete SAs command via netlink socket: Invalid argument (#2707)
by openspring 16 Apr '25
by openspring 16 Apr '25
16 Apr '25
### Description
<!--
When the following command is executed and pcscf.cfg set WITH_DEBUG
kamailio -f /usr/local/etc/pcscf/kamailio.cfg -P /kamailio_pcscf.pid -DD -E -e
Is this a mistake to be expected?
-->
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
0(117561) DEBUG: <core> [core/route_struct.c:128]: mk_action(): ACTION type5, i/count 0/1: type 1(1)/ data 0x7f8583620ef0
0(117561) DEBUG: <core> [core/route_struct.c:128]: mk_action(): ACTION type16, i/count 0/3: type 22(16)/ data 0x7f8583621ad8
0(117561) DEBUG: <core> [core/route_struct.c:128]: mk_action(): ACTION type16, i/count 1/3: type 8(8)/ data 0x7f8583620fd8
0(117561) DEBUG: <core> [core/route_struct.c:128]: mk_action(): ACTION type16, i/count 2/3: type 0(0)/ data 0x7f8500000000
0(117561) DEBUG: <core> [core/route.c:129]: route_add(): mapping routing block (0xb914c0)[MT_indialog_reply] to 6
ERROR: bad config file (1 errors)
0(117561) DEBUG: <core> [core/sr_module.c:765]: destroy_modules(): starting modules destroy phase
0(117561) DEBUG: debugger [debugger_api.c:1267]: dbg_destroy_mod_levels(): Destroyed _dbg_mod_table, size 32
0(117561) ERROR: ims_ipsec_pcscf [ipsec.c:567]: clean_sa(): Error sending delete SAs command via netlink socket: Invalid argument
0(117561) WARNING: ims_ipsec_pcscf [cmd.c:998]: ipsec_cleanall(): Error cleaning IPSec Security associations during startup.
0(117561) ERROR: ims_ipsec_pcscf [ipsec.c:609]: clean_policy(): Error sending delete policies command via netlink socket: Invalid argument
0(117561) WARNING: ims_ipsec_pcscf [cmd.c:1002]: ipsec_cleanall(): Error cleaning IPSec Policies during startup.
0(117561) ERROR: ims_ipsec_pcscf [ims_ipsec_pcscf_mod.c:309]: mod_destroy(): Error destroying spi generator
0(117561) ERROR: ims_ipsec_pcscf [ims_ipsec_pcscf_mod.c:313]: mod_destroy(): Error destroying port generator
0(117561) DEBUG: tm [t_funcs.c:84]: tm_shutdown(): start
0(117561) DEBUG: tm [t_funcs.c:87]: tm_shutdown(): emptying hash table
0(117561) DEBUG: tm [t_funcs.c:89]: tm_shutdown(): removing semaphores
0(117561) DEBUG: tm [t_funcs.c:91]: tm_shutdown(): destroying tmcb lists
0(117561) DEBUG: tm [t_funcs.c:94]: tm_shutdown(): done
0(117561) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
0(117561) DEBUG: <core> [core/mem/shm.c:289]: shm_destroy_manager(): destroying memory manager: q_malloc
0(117561) DEBUG: <core> [core/mem/q_malloc.c:1185]: qm_shm_lock_destroy(): destroying the shared memory lock
0(117561) DEBUG: <core> [core/mem/pkg.c:98]: pkg_destroy_manager(): destroying memory manager: q_malloc
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.4 (x86_64/linux) 8d6c2b
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 8d6c2b
compiled on 22:26:30 Apr 11 2021 with gcc 4.8.5
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2707
5
5
20 Jan '25
Close parentheses on error description when *Not enough parameters* on *htable_rpc_delete*.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2589
-- Commit Summary --
* Close parenthesis on error description
-- File Changes --
M src/modules/htable/htable.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2589.patch
https://github.com/kamailio/kamailio/pull/2589.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2589
3
4
16 Nov '24
Hello all
we are seeing these kind of logs in a Debian GNU/Linux 11 using kamailio 5.5.6
```Sep 21 17:41:13 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155702]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[164.152.22.248:5060](http://164.152.22.248:5060/))
Sep 21 17:41:13 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155698]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[208.74.138.184:5060](http://208.74.138.184:5060/))
Sep 21 17:41:13 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155695]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[208.74.138.181:5060](http://208.74.138.181:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155693]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[38.102.250.60:5060](http://38.102.250.60:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155707]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[87.1.1.27:5060](http://87.1.1.27:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155707]: ERROR: tm [ut.h:302]: uri2dst2(): no corresponding socket for "87.1.1.27" af 2
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155707]: ERROR: tm [t_fwd.c:470]: prepare_new_uac(): can't fwd to af 2, proto 1 (no corresponding listening socket)
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155697]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[208.74.138.184:5060](http://208.74.138.184:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155694]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[192.40.216.97:5060](http://192.40.216.97:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155694]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[208.74.138.180:5060](http://208.74.138.180:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155714]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[87.1.1.27:5060](http://87.1.1.27:5060/))
```
The kamailio instance we are using is receiving around 1500 calls per second in average when we do start seeing these errors more frequently
In this instance we are using multihomed
the listen address list is
``` children=14
socket_workers=1
listen=udp:[192.168.99.70:5081](http://192.168.99.70:5081/)
listen=udp:[192.168.99.81:5060](http://192.168.99.81:5060/)
listen=udp:[87.1.1.27:5060](http://87.1.1.27:5060/)
listen=tcp:[192.168.96.105:8095](http://192.168.96.105:8095/)
listen=tcp:[87.1.1.27:5060](http://87.1.1.27:5060/)
tcp_children=6
port=5060
```
We use the first worker only to perform the OPTIONS requests from the dispatcher module.
The sockets
listen=udp:[192.168.99.81:5060](http://192.168.99.81:5060/)
listen=udp:[87.1.1.27:5060](http://87.1.1.27:5060/)
are used to communicate both A and B legs
so when a message is received at [192.168.99.81:5060](http://192.168.99.81:5060/) we send it to [87.1.1.27:5060](http://87.1.1.27:5060/) and viceversa
We were using $fs variable before doing the t_relay() function.
This way is working, but when load increases, seems sometimes kamailio doesn't get the proper socket to forward the reply.
I think the errors mainly are related to responses which are being forwarded, like if the function get_sock_info_list was not able to retrieve the listen interfaces
we have tried to set in the onreply routes the commands
set_recv_socket("udp:[192.168.99.81:5060](http://192.168.99.81:5060/)");
set_send_socket("udp:[87.1.1.27:5060](http://87.1.1.27:5060/)"); (when reply goes from private to public domain)
and it seems it reduces the number of
```
Sep 21 17:41:13 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155702]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[164.152.22.248:5060](http://164.152.22.248:5060/))
Sep 21 17:41:13 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155698]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[208.74.138.184:5060](http://208.74.138.184:5060/))
Sep 21 17:41:13 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155695]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[208.74.138.181:5060](http://208.74.138.181:5060/))
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155693]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:[38.102.250.60:5060](http://38.102.250.60:5060/))
errors
```
But i honestly don't know why the
```Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155707]: ERROR: tm [ut.h:302]: uri2dst2(): no corresponding socket for "87.1.1.27" af 2
Sep 21 17:41:14 lax-dedge-1 /usr/local/kamailio/sbin/kamailio[3155707]: ERROR: tm [t_fwd.c:470]: prepare_new_uac(): can't fwd to af 2, proto 1 (no corresponding listening socket)
appear
```
We also tried to increase the kernel buffers rmem and wmem from 208KB (as we had by default) to 4MB
Do you know a reason which could cause these logs to appear?
Any setup that could mitigate them?
thanks a lot and regards
david escartin
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3583
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3583(a)github.com>
5
6
[kamailio/kamailio] BUG: freeing already freed pointer (0x7f19a3edec68), called from tls: tls_init.c with random core dumps (Issue #3205)
by Tim Chubb 08 Nov '24
by Tim Chubb 08 Nov '24
08 Nov '24
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Im getting frequent log entries like this:
`CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f19a3edec68), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring`
This on a fresh VM running Ubuntu 22.04 LTS on the 5.6 branch (building latest release tag)
As well as that log message being printed on a frequent basis (every 2 to 3 mins) i am experiencing random crashes/restarts of kamailio. Looking at the core dumps tls_init seems to precipitate the core dump.
I have tried using both the TLS module, and TLSA, in the case of TLSA to rule out OpenSSL3 being an issue i have tried linking against locally built OpenSSL 3.0.5 and OpenSSL 1.1.1q with identical results
I am in the process of repeating the build on Ubuntu 20.04 LTS to rule out weirdness with packages and similar issues i have experienced whilst evaluating 22.04 LTS
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(gdb) bt full
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140425701996352) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = 0x7fb76815b740
old_mask = {__val = {523986010119, 910533066753, 1, 140425395047168, 94230980435360, 0, 5677797456, 140425395047168, 140725986283600, 140425393986269, 94230963279192, 140425395047168, 94230963279402, 7970739754, 140725986283664, 140425394028321}}
ret = <optimized out>
pd = <optimized out>
old_mask = <optimized out>
ret = <optimized out>
tid = <optimized out>
ret = <optimized out>
resultvar = <optimized out>
resultvar = <optimized out>
__arg3 = <optimized out>
__arg2 = <optimized out>
__arg1 = <optimized out>
_a3 = <optimized out>
_a2 = <optimized out>
_a1 = <optimized out>
__futex = <optimized out>
resultvar = <optimized out>
__arg3 = <optimized out>
__arg2 = <optimized out>
__arg1 = <optimized out>
_a3 = <optimized out>
_a2 = <optimized out>
_a1 = <optimized out>
__futex = <optimized out>
__private = <optimized out>
__oldval = <optimized out>
result = <optimized out>
#1 __pthread_kill_internal (signo=6, threadid=140425701996352) at ./nptl/pthread_kill.c:78
No locals.
#2 __GI___pthread_kill (threadid=140425701996352, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
No locals.
#3 0x00007fb7681a0476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#4 0x00007fb7681867f3 in __GI_abort () at ./stdlib/abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x100000000, sa_sigaction = 0x100000000}, sa_mask = {__val = {140425395047168, 140725986283888, 140425393986269, 140425394365984, 140425394130944, 140425394801736, 5734026312, 140725986283952, 140425394028321, 15624006419995803439,
94230961557227, 94230963279168, 94230963279576, 140425422497024, 13020282480951897856, 72}}, sa_flags = -619194838, sa_restorer = 0x0}
sigs = {__val = {32, 13020282480951897856, 140725986284000, 94230961610857, 13546569962021497653, 14189927350396752214, 94230962920532, 0, 94230963279402, 140425394130944, 10, 38654707763, 12, 140425395047168, 32, 1438623432}}
#5 0x000055b3dafd8f12 in qm_debug_check_frag (qm=0x7fb755bc1000, f=0x7fb7576ce500, file=0x7fb766123154 "tls: tls_init.c", line=323, efile=0x55b3db17d559 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:129
p = 0x7fb755ca0b00
__func__ = "qm_debug_check_frag"
#6 0x000055b3dafdd788 in qm_free (qmp=0x7fb755bc1000, p=0x7fb7576ce538, file=0x7fb766123154 "tls: tls_init.c", func=0x7fb766124990 <__func__.0> "ser_free", line=323, mname=0x7fb766123150 "tls") at core/mem/q_malloc.c:511
qm = 0x7fb755bc1000
f = 0x7fb7576ce500
size = 24
next = 0x7fb7576ce500
prev = 0x7fb7576ce3f8
__func__ = "qm_free"
#7 0x000055b3dafe954e in qm_shm_free (qmp=0x7fb755bc1000, p=0x7fb7576ce538, file=0x7fb766123154 "tls: tls_init.c", func=0x7fb766124990 <__func__.0> "ser_free", line=323, mname=0x7fb766123150 "tls") at core/mem/q_malloc.c:1350
No locals.
#8 0x00007fb7660db698 in ser_free (ptr=0x7fb7576ce538, fname=0x7fb765efa6e5 "../crypto/err/err_local.h", fline=88) at tls_init.c:323
__func__ = "ser_free"
#9 0x00007fb765d2e907 in ERR_pop_to_mark () from /lib/x86_64-linux-gnu/libcrypto.so.3
No symbol table info available.
#10 0x00007fb765d76a42 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
No symbol table info available.
#11 0x00007fb765d669f5 in EVP_PKEY_set_type_by_keymgmt () from /lib/x86_64-linux-gnu/libcrypto.so.3
No symbol table info available.
#12 0x00007fb765d5ef9a in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.3
No symbol table info available.
#13 0x00007fb765d69973 in EVP_PKEY_generate () from /lib/x86_64-linux-gnu/libcrypto.so.3
No symbol table info available.
#14 0x00007fb766029279 in ?? () from /lib/x86_64-linux-gnu/libssl.so.3
No symbol table info available.
#15 0x00007fb76607a621 in ?? () from /lib/x86_64-linux-gnu/libssl.so.3
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--c
#16 0x00007fb7660687fd in ?? () from /lib/x86_64-linux-gnu/libssl.so.3
No symbol table info available.
#17 0x00007fb766104216 in tls_accept (c=0x7fb7576db4e8, error=0x7ffd526c58a4) at tls_server.c:468
ret = 1382832224
ssl = 0x7fb75755bef0
cert = 0x7fb75742dbb0
tls_c = 0x7fb7574429a8
tls_log = 1712337076
__func__ = "tls_accept"
pkey = 0x0
#18 0x00007fb76610f86d in tls_h_read_f (c=0x7fb7576db4e8, flags=0x7ffd526e5dac) at tls_server.c:1173
r = 0x7fb7576db610
bytes_free = 16383
bytes_read = 150
read_size = 16383
ssl_error = 0
ssl_read = 0
ssl = 0x7fb75755bef0
rd_buf = "\026\003\003\000\221\001\000\000\215\003\003b\347\222\177\213T\226\b\b\214\273\355\255[l\354\211\371rJ;<\033\356B\374y\024cg\352\067\000\000\020\300\060\300/\300(\300'\300,\300+\300$\300#\001\000\000T\000\000\000\022\000\020\000\000\rdr.teamsdr.uk\000\005\000\005\001\000\000\000\000\000\n\000\006\000\004\000\030\000\027\000\v\000\002\001\000\000\r\000\024\000\022\004\001\005\001\002\001\004\003\005\003\002\003\002\002\006\001\006\003\000#\000\000\000\027\000\000\377\001\000\001\000G\225 E\030j\223\313Hb\244@\271\323\030GQ\254\272\024\032z=H-\277\360\226\035qw\244\270(\004D\004\241\023\062\064\026\226\376\321\067\274\370\376?"...
wr_buf = "\026\003\003\000E\002\000\000A\003\003OHu\016\240\363=\252\356\260#\221\a\310ò&\237\000:FɆ\351DOWNGRD\001\000\300\060\000\000\031\377\001\000\001\000\000\000\000\000\000\v\000\004\003\000\001\002\000#\000\000\000\027\000\000\026\003\003\020\006\v\000\020\002\000\017\377\000\005x0\202\005t0\202\004\\\240\003\002\001\002\002\022\004\062_\v\313\031\021 \240[\376N\227\346\310\004e\r0\r\006\t*\206H\206\367\r\001\001\v\005\000\060\062\061\v0\t\006\003U\004\006\023\002US1\026\060\024\006\003U\004\n\023\rLet's Encrypt1\v0\t\006\003U\004\003\023\002R30\036\027\r22070519555"...
rd = {buf = 0x7ffd526c5a00 "\026\003\003", pos = 150, used = 150, size = 65536}
wr = {buf = 0x7ffd526d5a00 "\026\003\003", pos = 0, used = 4096, size = 65536}
tls_c = 0x7fb7574429a8
enc_rd_buf = 0x0
n = 0
flush_flags = 1
err_src = 0x7fb76612c9b0 "TLS read:"
ip_buf = "172.16.51.200", '\000' <repeats 50 times>
x = 0
tls_dbg = 0
__func__ = "tls_h_read_f"
#19 0x000055b3daf819f3 in tcp_read_headers (c=0x7fb7576db4e8, read_flags=0x7ffd526e5dac) at core/tcp_read.c:441
bytes = 4
remaining = 0
p = 0x7fb75736b870 "2"
r = 0x7fb7576db610
mc = 32695
body_len = 22326
mfline = 0x7fb755b9dadd <futex_release+29> "\211E\374\203}\374\002\017\224\300\017\266\300H\205\300t6H\213E\350H\203\354\bj"
mtransid = {s = 0x55b3db16d884 "", len = 1439304448}
__func__ = "tcp_read_headers"
#20 0x000055b3daf8ac9d in tcp_read_req (con=0x7fb7576db4e8, bytes_read=0x7ffd526e5da8, read_flags=0x7ffd526e5dac) at core/tcp_read.c:1469
bytes = -1
total_bytes = 0
resp = 1
size = 154618822664
req = 0x7fb7576db610
dst = {send_sock = 0x1, to = {s = {sa_family = 2816, sa_data = "\312U\267\177\000\000\320\\nR\375\177\000"}, sin = {sin_family = 2816, sin_port = 21962, sin_addr = {s_addr = 32695}, sin_zero = "\320\\nR\375\177\000"}, sin6 = {sin6_family = 2816, sin6_port = 21962, sin6_flowinfo = 32695, sin6_addr = {__in6_u = {__u6_addr8 = "\320\\nR\375\177\000\000\030\000\000\000\000\000\000", __u6_addr16 = {23760, 21102, 32765, 0, 24, 0, 0, 0}, __u6_addr32 = {1382964432, 32765, 24, 0}}}, sin6_scope_id = 1382964400}, sas = {ss_family = 2816, __ss_padding = "\312U\267\177\000\000\320\\nR\375\177\000\000\030\000\000\000\000\000\000\000\260\\nR\001\000\000\000\000\v\312U\267\177\000\000\260\\nR\375\177\000\000\335ڹU\267\177\000\000\204\330\026۳U\000\000\000\v\312U\267\177\000\000\002\000\000\000\000\000\000\000\002\000\000\000\001\000\000\000\360\\nR\375\177\000\000!\177\272U\267\177\000\000\360]nR\375\177\000\000\024]nR\375\177\000", __ss_align = 17179869204}}, id = -619259776, send_flags = {f = 21939, blst_imask = 0}, proto = 110 'n', proto_pad0 = -11 '\365', proto_pad1 = 28435}
c = 0 '\000'
ret = 1438243549
__func__ = "tcp_read_req"
#21 0x000055b3daf9072c in handle_io (fm=0x7fb766755bb8, events=1, idx=-1) at core/tcp_read.c:1780
ret = 8
n = 8
read_flags = RD_CONN_SHORT_READ
con = 0x7fb7576db4e8
s = 12
resp = 140425703179696
t = 1467216201
ee = 0x0
__func__ = "handle_io"
#22 0x000055b3daf7bd70 in io_wait_loop_epoll (h=0x55b3db270960 <io_w>, t=2, repeat=0) at core/io_wait.h:1070
n = 1
r = 0
fm = 0x7fb766755bb8
revents = 1
__func__ = "io_wait_loop_epoll"
#23 0x000055b3daf93760 in tcp_receive_loop (unix_sock=36) at core/tcp_read.c:1976
__func__ = "tcp_receive_loop"
#24 0x000055b3daf6fdde in tcp_init_children (woneinit=0x7ffd526e6198) at core/tcp_main.c:5236
r = 0
i = 7
reader_fd_1 = 36
pid = 0
si_desc = "tcp receiver (generic)\000\000\356\376\357ڳU\000\000panR\375\177\000\000\036\350\371\332\000\000\000\000\070\n\037f\000\000\000\000\313\307\025۳U\000\000\241\000nR\375\177\000\000\fj\f۳U\000\000\000\000\000\000\000\000\000\000ز\277U\267\177\000\000\036\000\000\000\000\000\000\000\020\316\363U\001\000\000\000`anR\375\177\000\000\036l\f۳U\000"
si = 0x0
__func__ = "tcp_init_children"
#25 0x000055b3dacbe65c in main_loop () at main.c:1851
i = 4
pid = 7714
si = 0x0
si_desc = "udp receiver child=3 sock=127.0.0.1:5050\000\060\066\060\000\000\000\000\003\000\000\000\036\000\000\000\000/a\230\356U\261\264X\307\036۳U\000\000\210\360\020۳U\000\000\000\000\000\000\000\000\000\000s\\\022۳U\000\000\036\000\000\000\000\000\000\000\260\305'h\267\177\000\000\060cnR\375\177\000\000zI\347ڳU\000"
nrprocs = 4
woneinit = 1
__func__ = "main_loop"
#26 0x000055b3dacc95b0 in main (argc=11, argv=0x7ffd526e68a8) at main.c:3085
cfg_stream = 0x55b3dc09c380
c = -1
r = 0
tmp = 0x7ffd526e7e37 ""
tmp_len = 0
port = 0
proto = 0
ahost = 0x0
aport = 0
options = 0x55b3db112278 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 1456913526
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7fb768491cee <_dl_runtime_resolve_xsave+142>
p = 0x7ffd526e68a8 "\334}nR\375\177"
st = {st_dev = 25, st_ino = 1712, st_nlink = 2, st_mode = 16892, st_uid = 9002, st_gid = 9002, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1659341338, tv_nsec = 499520451}, st_mtim = {tv_sec = 1659341338, tv_nsec = 499520451}, st_ctim = {tv_sec = 1659341338, tv_nsec = 499520451}, __glibc_reserved = {0, 0, 0}}
tbuf = '\000' <repeats 64 times>, "\377\000\000\000\000\000\000\000\000\377", '\000' <repeats 18 times>, "\377", '\000' <repeats 19 times>, "`", '\000' <repeats 15 times>, "\001", '\000' <repeats 145 times>...
option_index = 0
long_options = {{name = 0x55b3db1146b6 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55b3db10f521 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55b3db1146bb "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55b3db1146c1 "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55b3db1146c7 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55b3db1146d0 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x55b3db1146da "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x55b3db1146e4 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55b3db1146ef "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55b3db1146f8 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55b3db114703 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55b3db114709 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55b3db114713 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x55b3db11471a "all-errors", has_arg = 0, flag = 0x0, val = 1035}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb) info locals
tid = <optimized out>
ret = 0
pd = 0x7fb76815b740
old_mask = {__val = {523986010119, 910533066753, 1, 140425395047168, 94230980435360, 0, 5677797456, 140425395047168, 140725986283600, 140425393986269, 94230963279192, 140425395047168, 94230963279402, 7970739754, 140725986283664, 140425394028321}}
ret = <optimized out>
pd = <optimized out>
old_mask = <optimized out>
ret = <optimized out>
tid = <optimized out>
ret = <optimized out>
resultvar = <optimized out>
resultvar = <optimized out>
__arg3 = <optimized out>
__arg2 = <optimized out>
__arg1 = <optimized out>
_a3 = <optimized out>
_a2 = <optimized out>
_a1 = <optimized out>
__futex = <optimized out>
resultvar = <optimized out>
__arg3 = <optimized out>
__arg2 = <optimized out>
__arg1 = <optimized out>
_a3 = <optimized out>
_a2 = <optimized out>
_a1 = <optimized out>
__futex = <optimized out>
__private = <optimized out>
__oldval = <optimized out>
result = <optimized out>
(gdb) list
39 in ./nptl/pthread_kill.cq
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
Aug 1 12:21:45 kam-test01 /usr/local/sbin/kamailio[25442]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Aug 1 12:21:47 kam-test01 kamailio: INFO: <core> [core/sctp_core.c:74]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module
Aug 1 12:21:47 kam-test01 kamailio: INFO: <core> [core/tcp_main.c:5080]: init_tcp(): using epoll_lt as the io watch method (auto detected)
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_mod.c:399]: mod_init(): use OpenSSL version: 30000020
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_mod.c:401]: mod_init(): With ECDH-Support!
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_mod.c:404]: mod_init(): With Diffie Hellman
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: auth [auth_mod.c:345]: mod_init(): qop set, but nonce-count (nonce_count) support disabled
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: rr [rr_mod.c:188]: mod_init(): outbound module not available
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: db_text [dbt_lib.c:146]: dbt_cache_get_db(): using database at: /etc/kamailio/dbtext
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: WARNING: tls [tls_init.c:804]: tls_h_mod_init_f(): tls: openssl bug #1491 (crash/mem leaks on low memory) workaround disabled
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [main.c:3062]: main(): processes (at least): 30 - shm size: 134217728 - pkg size: 33554432
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 for fd 9
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [core/udp_server.c:207]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 on fd 9
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 for fd 10
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [core/udp_server.c:207]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 on fd 10
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 for fd 11
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [core/udp_server.c:207]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 on fd 11
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:328]: ksr_tls_fill_missing(): TLSs<default>: tls_method=20
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSs<default>: certificate='/etc/kamailio/livecert/fullchain.pem'
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSs<default>: ca_list='/etc/kamailio/livecert/chain.pem'
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSs<default>: ca_path='(null)'
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:361]: ksr_tls_fill_missing(): TLSs<default>: crl='(null)'
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSs<default>: require_certificate=0
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:372]: ksr_tls_fill_missing(): TLSs<default>: cipher_list='AES256-SHA'
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:379]: ksr_tls_fill_missing(): TLSs<default>: private_key='/etc/kamailio/livecert/privkey.pem'
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSs<default>: verify_certificate=0
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:386]: ksr_tls_fill_missing(): TLSs<default>: verify_depth=9
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:389]: ksr_tls_fill_missing(): TLSs<default>: verify_client=0
Aug 1 12:21:47 kam-test01 /usr/local/sbin/kamailio[25502]: NOTICE: tls [tls_domain.c:1144]: ksr_tls_fix_domain(): registered server_name callback handler for socket [:0], server_name='<default>' ...
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:750]: set_verification(): TLSs<default>: No client certificate required and no checks performed
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:328]: ksr_tls_fill_missing(): TLSc<default>: tls_method=18
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSc<default>: certificate='/etc/kamailio/livecert/fullchain.pem'
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSc<default>: ca_list='/etc/kamailio/livecert/chain.pem'
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSc<default>: ca_path='(null)'
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:361]: ksr_tls_fill_missing(): TLSc<default>: crl='(null)'
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSc<default>: require_certificate=0
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:372]: ksr_tls_fill_missing(): TLSc<default>: cipher_list='ECDHE-RSA-AES256-GCM-SHA384'
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:379]: ksr_tls_fill_missing(): TLSc<default>: private_key='/etc/kamailio/livecert/privkey.pem'
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSc<default>: verify_certificate=0
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:386]: ksr_tls_fill_missing(): TLSc<default>: verify_depth=9
Aug 1 12:21:49 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:389]: ksr_tls_fill_missing(): TLSc<default>: verify_client=0
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:753]: set_verification(): TLSc<default>: Server MAY present invalid certificate
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:328]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: tls_method=22
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: certificate='/etc/kamailio/livecert/fullchain.pem'
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: ca_list='/etc/kamailio/livecert/chain.pem'
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: ca_path='(null)'
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:361]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: crl='(null)'
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: require_certificate=0
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:372]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: cipher_list='ECDHE-RSA-AES256-GCM-SHA384'
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:379]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: private_key='/etc/kamailio/livecert/privkey.pem'
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_certificate=0
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:386]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_depth=9
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:389]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_client=0
Aug 1 12:21:50 kam-test01 /usr/local/sbin/kamailio[25502]: NOTICE: tls [tls_domain.c:1144]: ksr_tls_fix_domain(): registered server_name callback handler for socket [172.16.51.200:5067], server_name='test2.test.com' ...
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:750]: set_verification(): TLSs<172.16.51.200:5067>: No client certificate required and no checks performed
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:328]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: tls_method=22
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: certificate='/etc/kamailio/livecert/fullchain.pem'
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: ca_list='/etc/kamailio/livecert/chain.pem'
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: ca_path='(null)'
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:361]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: crl='(null)'
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: require_certificate=0
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:372]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: cipher_list='ECDHE-RSA-AES256-GCM-SHA384'
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:379]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: private_key='/etc/kamailio/livecert/privkey.pem'
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_certificate=0
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:386]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_depth=9
Aug 1 12:21:51 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:389]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_client=0
Aug 1 12:21:52 kam-test01 /usr/local/sbin/kamailio[25502]: NOTICE: tls [tls_domain.c:1144]: ksr_tls_fix_domain(): registered server_name callback handler for socket [172.16.51.200:5067], server_name='test.test.com' ...
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:750]: set_verification(): TLSs<172.16.51.200:5067>: No client certificate required and no checks performed
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:328]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: tls_method=22
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: certificate='/etc/kamailio/livecert/fullchain.pem'
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: ca_list='/etc/kamailio/livecert/chain.pem'
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: ca_path='(null)'
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:361]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: crl='(null)'
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: require_certificate=0
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:372]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: cipher_list='ECDHE-RSA-AES256-GCM-SHA384'
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:379]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: private_key='/etc/kamailio/livecert/privkey.pem'
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_certificate=0
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:386]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_depth=9
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:389]: ksr_tls_fill_missing(): TLSs<172.16.51.200:5067>: verify_client=0
Aug 1 12:21:53 kam-test01 /usr/local/sbin/kamailio[25502]: NOTICE: tls [tls_domain.c:1144]: ksr_tls_fix_domain(): registered server_name callback handler for socket [172.16.51.200:5067], server_name='test3.test.com' ...
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:750]: set_verification(): TLSs<172.16.51.200:5067>: No client certificate required and no checks performed
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:328]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: tls_method=18
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: certificate='/etc/kamailio/livecert/fullchain.pem'
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: ca_list='/etc/kamailio/livecert/chain.pem'
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: ca_path='(null)'
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:361]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: crl='(null)'
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: require_certificate=0
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:372]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: cipher_list='ECDHE-RSA-AES256-GCM-SHA384'
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:379]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: private_key='/etc/kamailio/livecert/privkey.pem'
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: verify_certificate=0
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:386]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: verify_depth=9
Aug 1 12:21:54 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:389]: ksr_tls_fill_missing(): TLSc<172.16.51.200:5067>: verify_client=0
Aug 1 12:21:56 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: tls [tls_domain.c:753]: set_verification(): TLSc<172.16.51.200:5067>: Server MAY present invalid certificate
Aug 1 12:21:56 kam-test01 /usr/local/sbin/kamailio[25504]: INFO: rtpengine [rtpengine.c:2929]: rtpp_test(): rtpengine instance <udp:127.0.0.1:2223> found, support for it enabled
Aug 1 12:21:56 kam-test01 /usr/local/sbin/kamailio[25520]: INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/25520
Aug 1 12:21:56 kam-test01 /usr/local/sbin/kamailio[25523]: INFO: ctl [io_listener.c:213]: io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config)
Aug 1 12:21:57 kam-test01 /usr/local/sbin/kamailio[25525]: ERROR: <script>: 758:No dispatcher sets up yet
Aug 1 12:21:57 kam-test01 /usr/local/sbin/kamailio[25525]: ERROR: <script>: 758:No dispatcher sets up yet
Aug 1 12:21:57 kam-test01 /usr/local/sbin/kamailio[25525]: WARNING: <script>: 548:[LOCATION] Location not found rc: -1 sip:lPBKm2s70BBd6u@sipuat.voicesimplified.com;transport=TLS
Aug 1 12:21:57 kam-test01 /usr/local/sbin/kamailio[25525]: ERROR: <script>: 758:No dispatcher sets up yet
Aug 1 12:21:59 kam-test01 /usr/local/sbin/kamailio[25532]: ERROR: <core> [core/tcp_main.c:4672]: tcpconn_main_timeout(): connect 185.29.208.21:5061 failed (timeout)
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25508]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25510]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25511]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25508]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25504]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25505]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:06 kam-test01 /usr/local/sbin/kamailio[25504]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:07 kam-test01 /usr/local/sbin/kamailio[25506]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:07 kam-test01 /usr/local/sbin/kamailio[25505]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:07 kam-test01 /usr/local/sbin/kamailio[25506]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:07 kam-test01 /usr/local/sbin/kamailio[25507]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:07 kam-test01 /usr/local/sbin/kamailio[25506]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:22:07 kam-test01 /usr/local/sbin/kamailio[25506]: NOTICE: <script>: Destination up: sip:redacted
Aug 1 12:24:48 kam-test01 /usr/local/sbin/kamailio[25525]: INFO: <script>: R-URI Alias Found and processed
Aug 1 12:24:48 kam-test01 /usr/local/sbin/kamailio[25510]: INFO: <script>: R-URI Alias Found and processed
Aug 1 12:26:06 kam-test01 /usr/local/sbin/kamailio[25513]: WARNING: tm [t_reply.c:1677]: t_retransmit_reply(): no resolved dst to retransmit
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25526]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7a8a860d80), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25532]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 36
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25502]: ALERT: <core> [main.c:776]: handle_sigs(): child process 25526 exited by a signal 11
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25502]: ALERT: <core> [main.c:779]: handle_sigs(): core was generated
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25502]: INFO: <core> [main.c:801]: handle_sigs(): terminating due to SIGCHLD
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25532]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25513]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25531]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25522]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25521]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25525]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25520]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25514]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25529]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25511]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25515]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25509]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25519]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25516]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25517]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25512]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25510]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25506]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25504]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25524]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25518]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25523]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25508]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25528]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25530]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25505]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25507]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
Aug 1 12:27:17 kam-test01 /usr/local/sbin/kamailio[25527]: INFO: <core> [main.c:856]: sig_usr(): signal 15 received
```
### Additional Information
Tested against kamailio 5.6 and devel branches with a distclean between builds
```
(paste your output here)
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Linux kam-test01 5.15.0-1014-azure #17-Ubuntu SMP Thu Jun 23 19:04:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3205
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3205(a)github.com>
7
21
[kamailio/kamailio] kazoo: 'amqp_set_initialize_ssl_library' is deprecated (Issue #3466)
by sergey-safarov 08 Oct '24
by sergey-safarov 08 Oct '24
08 Oct '24
From the build log
```
CC (gcc) [M kazoo.so] kazoo.o
CC (gcc) [M kazoo.so] kz_amqp.o
kz_amqp.c: In function 'kz_amqp_connection_open_ssl':
kz_amqp.c:857:17: warning: 'amqp_set_initialize_ssl_library' is deprecated [-Wdeprecated-declarations]
857 | amqp_set_initialize_ssl_library(1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kz_amqp.c:37:
/usr/include/rabbitmq-c/ssl_socket.h:233:16: note: declared here
233 | void AMQP_CALL amqp_set_initialize_ssl_library(amqp_boolean_t do_initialize);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M kazoo.so] kz_fixup.o
CC (gcc) [M kazoo.so] kz_hash.o
```
Functions description in the header file
https://github.com/alanxz/rabbitmq-c/blob/v0.13.0/include/rabbitmq-c/ssl_so…
```
/**
* Sets whether rabbitmq-c will initialize OpenSSL.
*
* \deprecated Since v0.13.0 this is a no-op. OpenSSL automatically manages
* library initialization and uninitialization.
*
* OpenSSL requires a one-time initialization across a whole program, this sets
* whether or not rabbitmq-c will initialize the SSL library when the first call
* to amqp_ssl_socket_new() is made. You should call this function with
* do_init = 0 if the underlying SSL library is initialized somewhere else
* the program.
*
* Failing to initialize or double initialization of the SSL library will
* result in undefined behavior
*
* By default rabbitmq-c will initialize the underlying SSL library.
*
* NOTE: calling this function after the first socket has been opened with
* amqp_open_socket() will not have any effect.
*
* \param [in] do_initialize If 0 rabbitmq-c will not initialize the SSL
* library, otherwise rabbitmq-c will initialize the
* SSL library
*
* \since v0.4.0
*/
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3466
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3466(a)github.com>
3
4
[kamailio/kamailio] TM crash when relaying reply, in context of unreachable rtpengine (Issue #3297)
by Alex Balashov 22 Sep '24
by Alex Balashov 22 Sep '24
22 Sep '24
When relaying this `200 OK` repeatedly with calls to `rtpengine_answer()` failing because all RTPEngines in a set are unreachable...
```
Dec 8 06:24:38 gw kamailio[4823]: ERROR: rtpengine [rtpengine.c:2960]: select_rtpp_node(): rtpengine failed to select new for calllen=36 callid=8279a4ea-151e-48de-a23c-5840104126de
```
```
SIP/2.0 200 OK
v:SIP/2.0/UDP 10.150.20.20;branch=z9hG4bK03e.e4da444e627bb575ef4f46151729a1fa.0,SIP/2.0/UDP 10.151.20.108;received=10.151.20.108;rport=5060;branch=z9hG4bKKQyrBKpp04X0K
Record-Route:<sip:10.150.20.20;lr;ftag=emHm2apy95jFe;rtp_relay=1;rtp_group=0>
f:"14045551212"<sip:14045551212@10.151.20.108>;tag=emHm2apy95jFe
t:<sip:16782001111@internal.evaristesys.com>;tag=tHQt0rDcF7UHK
i:8279a4ea-151e-48de-a23c-5840104126de
CSeq:60686471 INVITE
m:<sip:16782001111@10.160.10.55:5060;transport=udp>
User-Agent:VoiceAppServer
Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REFER,NOTIFY
k:path,replaces
u:talk,hold,conference,refer
c:application/sdp
Content-Disposition:session
l:257
v=0
o=DM 1670428117 1670428118 IN IP4 10.160.10.55
s=DM
c=IN IP4 10.160.10.55
t=0 0
m=audio 52418 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=rtcp:52419 IN IP4 10.160.10.55
```
Repeat INVITEs eventually result in a crash. This backtrace is taken from a different server but identical scenario:
```
#0 t_should_relay_response (Trans=0x7f4aee56ba80, new_code=200, branch=0, should_store=0x7ffd8b8bbba0, should_relay=0x7ffd8b8bbba4, cancel_data=0x7ffd8b8bbe40,
reply=0x7f4afe40df70) at t_reply.c:1285
1285 && !(inv_through && Trans->uac[branch].last_received<300)) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 jansson-2.11-1.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libev-4.03-3.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 libunistring-0.9.3-5.el6.x86_64 openssl-1.0.1e-48.el6_8.3.x86_64 sqlite-3.6.20-1.el6_7.2.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) where
#0 t_should_relay_response (Trans=0x7f4aee56ba80, new_code=200, branch=0, should_store=0x7ffd8b8bbba0, should_relay=0x7ffd8b8bbba4, cancel_data=0x7ffd8b8bbe40,
reply=0x7f4afe40df70) at t_reply.c:1285
#1 0x00007f4afd73ab7d in relay_reply (t=0x7f4aee56ba80, p_msg=0x7f4afe40df70, branch=0, msg_status=200, cancel_data=0x7ffd8b8bbe40, do_put_on_wait=1)
at t_reply.c:1821
#2 0x00007f4afd740c38 in reply_received (p_msg=0x7f4afe40df70) at t_reply.c:2558
#3 0x00000000004b5d6a in do_forward_reply (msg=0x7f4afe40df70, mode=0) at core/forward.c:747
#4 0x00000000004b78c9 in forward_reply (msg=0x7f4afe40df70) at core/forward.c:852
#5 0x000000000054982b in receive_msg (
buf=0xb27700 "SIP/2.0 200 OK\r\nv:SIP/2.0/UDP xxx;branch=z9hG4bK9915.dcfe6d03cb21e6c94a6705adb095c566.0,SIP/2.0/UDP xxx;received=xxx;rport=5060;branch=z9hG4bKZmZp0NZv3FvQB\r\nRecord-Rout"..., len=984, rcv_info=0x7ffd8b8bc6c0) at core/receive.c:434
#6 0x00000000006658ca in udp_rcv_loop () at core/udp_server.c:541
#7 0x000000000042500f in main_loop () at main.c:1655
#8 0x000000000042c5bb in main (argc=11, argv=0x7ffd8b8bcc88) at main.c:2696
```
Looks like in the crash frame, `Trans->uac` is `NULL`:
```
(gdb) frame 0
#0 t_should_relay_response (Trans=0x7f4aee56ba80, new_code=200, branch=0, should_store=0x7ffd8b8bbba0, should_relay=0x7ffd8b8bbba4, cancel_data=0x7ffd8b8bbe40,
reply=0x7f4afe40df70) at t_reply.c:1285
1285 && !(inv_through && Trans->uac[branch].last_received<300)) {
(gdb) print Trans->uac
$1 = (struct ua_client *) 0x0
```
I have seen this crash from time to time, though it is infrequent. It always seems to occur when there are problems reaching RTPEngine in a timely fashion.
This is on Kamailio 5.2.4:de9a03, which I know has long fallen off the back of the maintenance train. However, line 1386 of `t_reply.c` in `master:HEAD` shows that the code is no different now:
https://github.com/kamailio/kamailio/blob/master/src/modules/tm/t_reply.c#L…
Of course, it's possible that something upstream has changed so as to prevent this state. Otherwise, I suppose a null pointer safety check for `Trans->uac` is recommended. I'd be happy to submit a patch, just wasn't sure if the feeling was more that this should be resolved higher up the call stack.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3297
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3297(a)github.com>
2
3