Hello Sergiu,
Thank you for the pointer, the line 1576 is:
get_profile_size("callee", "$avp(custid)", "$avp(concurrent)");
That is where Kamailio refuses to start....
And as you mentioned my error in the IF statement after correction you
pointed out, Kamailio still refuses on the fact that the profile
<callee> was not defined...
Dec 4 13:42:50 proxy01 /usr/local/sbin/kamailio[75008]: CRITICAL:
dialog [dialog.c:391]: fixup_profile(): profile <callee> not defined
Dec 4 13:42:50 proxy01 /usr/local/sbin/kamailio[75008]: ERROR: <core>
[core/route.c:1166]: fix_actions(): fixing failed (code=-6) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:1576
Dec 4 13:42:50 proxy01 systemd[1]: kamailio.service: Main process
exited, code=exited, status=255/n/a
Dec 4 13:42:50 proxy01 systemd[1]: kamailio.service: Failed with result
'exit-code'.
Does anyone else maybe have an idea on where I go wrong?
Rgds,
Gertjan
Hello,
I noticed that when i do calls behind NAT i'm getting this error when i
call fix_nated_sdp() :
"nathelper [nathelper.c:1659]: replace_sdp_ip(): can't extract 'a=rtcp'
IP from the SDP"
As far as i can see, all the ips on SDP are correctly replaced to a public
IP, so i don't understand the origin of this error.
This is the SDP received by Kamailio :
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 3421914885 1 IN IP4 192.168.24.89
Session Name (s): SIPPER for PhonerLite
Connection Information (c): IN IP4 192.168.24.89
Time Description, active time (t): 0 0
Media Description, name and address (m): audio 5062 RTP/AVP 107 8 0 2 3
97 110 111 9 18 11 118 101
Media Attribute (a): rtpmap:107 opus/48000/2
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:2 G726-32/8000
Media Attribute (a): rtpmap:3 GSM/8000
Media Attribute (a): rtpmap:97 iLBC/8000
Media Attribute (a): rtpmap:110 speex/8000
Media Attribute (a): rtpmap:111 speex/16000
Media Attribute (a): rtpmap:9 G722/8000
Media Attribute (a): rtpmap:18 G729/8000
Media Attribute (a): fmtp:18 annexb=yes
Media Attribute (a): rtpmap:11 L16/44100
Media Attribute (a): rtpmap:118 L16/16000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-16
Media Attribute (a): ssrc:2716178988
Media Attribute (a): sendrecv
And this is the SDP sent by Kamailio after NAT being treated :
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 3421914885 1 IN IP4 1.1.1.1 (Public IP)
Session Name (s): SIPPER for PhonerLite
Connection Information (c): IN IP4 1.1.1.1 (Public IP)
Time Description, active time (t): 0 0
Media Description, name and address (m): audio 5062 RTP/AVP 107 8 0 2 3
97 110 111 9 18 11 118 101
Media Attribute (a): rtpmap:107 opus/48000/2
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:2 G726-32/8000
Media Attribute (a): rtpmap:3 GSM/8000
Media Attribute (a): rtpmap:97 iLBC/8000
Media Attribute (a): rtpmap:110 speex/8000
Media Attribute (a): rtpmap:111 speex/16000
Media Attribute (a): rtpmap:9 G722/8000
Media Attribute (a): rtpmap:18 G729/8000
Media Attribute (a): fmtp:18 annexb=yes
Media Attribute (a): rtpmap:11 L16/44100
Media Attribute (a): rtpmap:118 L16/16000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-16
Media Attribute (a): ssrc:2716178988
Media Attribute (a): sendrecv
Media Attribute (a): oldmediaip:192.168.24.89
Media Attribute (a): oldmediaip:192.168.24.89
Is there something failing in the SDP fix?
Best Regards,
Has anyone ever implemented DMQ replication of TOPOS data between
kamailio servers?
I'm trying to find the easiest (to maintain) way to implement this
replication, possibly without using an external database.
James
Hello, all have a problem with Kamailio presence, I have configured my
kamailio.cfg to handle dialog presence and facing issue in case of
subs_db_mode = 2 in case of mode 2 facing the following presence issue.
1. after hangup presence is still up
2. sometimes stuck in a ringing state
3. sometimes presence not came..etc
but in the case of subs_db_mode = 3 (DB ONLY) mode presence working fine
not facing any issue with this mode.
I noticed that sometimes Kamailio will throw the following message during
PUBLISH processing and it will not generate appropriate NOTIFY I also
verify inactive watcher subscription is there for that user and also a
proper entry in the dialog table.
MSG during PUBLISH processesing and it will not generate appropriate NOTIFY
Oct 30 07:42:10 NC-HOSTED-1 /usr/local/sbin/kamailio[2409]: DEBUG: presence
[notify.c:1444]: publ_notify(): Could not find subs_dialog
kamailio.cfg param
modparam("pua", "db_url", DBURL_KAMAILIO)
modparam("pua", "db_mode", 2)
modparam("pua", "update_period", 100)
modparam("pua", "dlginfo_increase_version", 1)
modparam("pua", "default_expires", 3600)
modparam("pua", "fetch_rows", 1000)
modparam("pua", "outbound_proxy", SERVER_IP)
modparam("dialog", "db_url", DBURL_KAMAILIO )
modparam("dialog", "db_mode", 1)
modparam("dialog", "db_update_period", 260)
modparam("dialog", "db_fetch_rows", 500)
modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "send_publish_flag", 8)
modparam("pua_dialoginfo", "caller_confirmed", 0)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "use_pubruri_avps", 1)
modparam("pua_dialoginfo", "include_localremote", 1)
modparam("pua_dialoginfo", "override_lifetime", 300)
modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
modparam("pua_dialoginfo", "pubruri_caller_dlg_var", "pubruri_caller")
modparam("pua_dialoginfo", "pubruri_callee_dlg_var", "pubruri_callee")
modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(s:puburis_callee)")
modparam("presence_dialoginfo", "force_single_dialog", 1)
modparam("presence", "db_table_lock_type", 0)
modparam("presence", "db_url", DBURL_KAMAILIO)
modparam("presence", "db_update_period", 5)
modparam("presence", "send_fast_notify", 1)
modparam("presence", "clean_period", 100)
modparam("presence", "subs_db_mode", 2)
//modparam("presence", "subs_db_mode", 3)
modparam("presence", "timeout_rm_subs", 1) //new/
//modparam("presence", "notifier_processes", 2) //new//
modparam("presence", "notifier_poll_rate", 20) //new//
modparam("presence", "waitn_time",1)
modparam("presence", "fetch_rows", 1000)
modparam("presence", "presentity_table", "presentity")
modparam("presence", "active_watchers_table", "active_watchers")
modparam("presence", "watchers_table", "watchers")
modparam("presence", "max_expires", 3600)
modparam("presence_xml", "db_url", DBURL_KAMAILIO)
modparam("presence_xml", "force_active", 1)
logic for presence
request_route {
if(is_method("PUBLISH") || is_method("SUBSCRIBE")) {
route(HANDLE_PRESENCE);
}
}
route[HANDLE_PRESENCE] {
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;
}
route[RELAY] {
if(is_method("INVITE|BYE|UPDATE|CANCEL|ACK")) {
$avp(t_ext) = $tU ;
$avp(domain) = $fd ;
$avp(et) = $_s(sip:$avp(t_ext)@$avp(domain)) ;
$avp(s:puburis_callee) = $avp(et);
setflag(8);
dlg_manage();
}
}
I already report this issue in Kamailio git
https://github.com/kamailio/kamailio/issues/2540
--
--
Regards,
*Aatif Shaikh *| Software Developer
+91 9033976268Hangout: aatif.shaikh(a)ecosmob.comSkype :
aatif.shaikh(a)ecosmob.com
*Ecosmob Technologies Pvt. Ltd. *
https://www.ecosmob.com
VoIP | Web | Mobile | IoT | Big Data
<https://twitter.com/ecosmob> <https://www.facebook.com/Ecosmob>
<https://plus.google.com/+Ecosmob>
<https://www.linkedin.com/company/ecosmob>
<https://in.pinterest.com/ecosmob/>
This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended recipient(s).
Any unauthorized disclosure, dissemination, distribution, copying or the
taking of any action in reliance on the information herein is prohibited.
Ecosmob Technologies is not responsible for errors or omissions in this
message and denies any responsibility for any damage arising from the use
of e-mail. Any opinion and other statement contained in this message and
any attachment are solely those of the author and do not necessarily
represent those of the company.
--
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our
website, any views or opinions presented in this email are solely those of
the originator and do not necessarily represent those of the Company or its
sister concerns. Any liability (in negligence, contract or otherwise)
arising from any third party taking any action, or refraining from taking
any action on the basis of any of the information contained in this email
is hereby excluded.
*Confidentiality*
This communication (including any
attachment/s) is intended only for the use of the addressee(s) and contains
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading,
dissemination, distribution, or copying of this communication is
prohibited. Please inform originator if you have received it in error.
*Caution for viruses, malware etc.*
This communication, including any
attachments, may not be free of viruses, trojans, similar or new
contaminants/malware, interceptions or interference, and may not be
compatible with your systems. You shall carry out virus/malware scanning on
your own before opening any attachment to this e-mail. The sender of this
e-mail and Company including its sister concerns shall not be liable for
any damage that may incur to you as a result of viruses, incompleteness of
this message, a delay in receipt of this message or any other computer
problems.
Hello Kamailions,
I am running into the following issue.
The same setup I had working on 5.0, now I am using a 5.4 version of
Kamailio, but I do not believe it has to do with the version, more with
my ability to make errors...
I am trying to limit incoming calls by using the dialog module. The max
concurrent calls value I retrieve from a database.
But when I try to start Kamailio it will not because the dialog profile
is not defined...
These are my configured Dialog parameters:
# ---- Dialog params -------------
modparam("dialog", "default_timeout", 7200)
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_flag", DLG_FLAG)
modparam("dialog", "hash_size", 4096)
#modparam("dialog", "detect_spirals", 1)
modparam("dialog", "profiles_with_value", "callee")
My check on the concurrent inbound calls:
route[CONCURRENT_IN]
{
#Add call to callee profile
#Check if callee has not reached inbound call limit
#Get max concurrent calls
sql_query("cc", "select max_calls_in from calllimit where
cust_id='$avp(custid)'", "ra");
$avp(maxcalls)=$dbr(ra=>[0,0]);
sql_result_free("ra");
$avp(concurrent) = 0;
get_profile_size("callee", "$avp(custid)", "$avp(concurrent)");
if( $avp(concurrent) = $var(max) )
{
xlog("L_INFO"," Call limit reached for customer
$avp(custid)\r\n ");
sl_send_reply("503", "No Lines Available");
exit;
}
set_dlg_profile("callee", "$avp(custid)");
return;
}
And the kamailio log error:
Dec 3 09:12:08 proxy01 kamailio[74102]: INFO: <core> [main.c:2833]:
main(): processes (at least): 21 - shm size: 67108864 - pkg size: 8388608
Dec 3 09:12:08 proxy01 kamailio[74102]: CRITICAL: dialog
[dialog.c:391]: fixup_profile(): profile <callee> not defined
Dec 3 09:12:08 proxy01 kamailio[74102]: ERROR: <core>
[core/route.c:1166]: fix_actions(): fixing failed (code=-6) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:1576
Is someone able to see where I go wrong and point me in the right direction?
Thank you.
Rgds,
Gertjan Wolzak
Hello!
I'm using a $TF variable in my config for some logging purposes. It was
providing the correct string with Kamailio version 5.3.8 on CentOS 6 and 8.
After updating to Kamailio version 5.4.1, the variable started to show
something else.
I also tried versions 5.4.2 and development 5.5.0 on CentOS 6 and the
problem still persists. With version 5.5.0_dev3 this variable shows "pG▒"
for me.
I was wondering if someone else is using it too with Kamailio version 5.4.1
or newer on different platforms and has this issue.
Thanks!
Hello everyone,
On a debian buster i added the repo
deb http://deb.kamailio.org/kamailio51 buster main
deb-src http://deb.kamailio.org/kamailio51 buster main
But when i install i get 5.2, is this right?
additional info:
# apt-cache showpkg kamailio
Package: kamailio
Versions:
5.2.1-1
(/var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_binary-i386_Packages)
(/var/lib/dpkg/status)
Description Language:
File:
/var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_binary-i386_Packages
MD5: df3e15f422439e08c305782f5650a98c
Description Language: en
File:
/var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_i18n_Translation-en
MD5: df3e15f422439e08c305782f5650a98c
5.1.10.1+bpo10
(/var/lib/apt/lists/deb.kamailio.org_kamailio51_dists_buster_main_binary-i386_Packages)
Description Language:
File:
/var/lib/apt/lists/deb.kamailio.org_kamailio51_dists_buster_main_binary-i386_Packages
MD5: ebddf40d0dfbfde1c479419970f978c7
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Folks,
I have a weird situation, when I enable Path header, kamailio behind a
Path proxy,
that kamailio doesn't recognise the ACK to CANCEL and tries to forward it.
Test scenario:
- voice.example.com is a stateless proxy with TLS/UDP bridging to kamailio.
- on the UDP leg to kamailio it will add a Path: header to REGISTER
UA1 = david is calling UA2 = charles and UA2 is sending 603
1 . UA1: preloaded route set (outbound proxy)
# this is the Path proxy
Route: sip:voice.example.com;transport=tls;lr
2. UA2: sends CANCEL 603
- kamailio immediately sends its (per-hop?) ACK
- kamailio forwards CANCEL to UA1
kamailio sent this (per-hop?) ACK
- the Route header is the internal UDP interface of the Path proxy
ACK sip:charles@192.168.1.7:37309;transport=TCP;ob SIP/2.0
Via: SIP/2.0/UDP
192.168.122.99:5064;branch=z9hG4bK735d.6b27c8d09e40462ef47eccf90eb10823.0
Max-Forwards: 70
From: sip:david@voice.example.com;tag=i1acAHsitf2gcN9uHH-ZSyJ5OdT8O5M0
To: <sip:charles@voice.example.com>;tag=LmUY79rIdBQiiSakML4F0lHl271VdUn8
Call-ID: qM3W-fMrzPsvcjRSD1okEp5nbgHCF5Hu
CSeq: 16667 ACK
Route: <sip:192.168.122.100;lr>
Content-Length: 0
3. UA1 sends ACK
kamailio sees this
- top Via is path proxy
- 2nd Via is UA (caller)
- CSeq correctly matches the INVITE
- kamailio does not recognise this ACK from UA1(caller),
tries to forward it, and also resends 603 to UA1(caller) 3 times
ACK sip:charles@voice.example.com SIP/2.0
Via: SIP/2.0/UDP
192.168.122.100:5060;branch=z9hG4bKb3c9a7a3b6ec9e78d0144cda709f7047
Via: SIP/2.0/TLS
192.168.1.17:44925;rport=44925;branch=z9hG4bKPjFM-9gpaJEghJvN19TjnvScCwCoAGzwEc;alias;received=192.168.1.17
Max-Forwards: 70
From: sip:david@voice.example.com;tag=i1acAHsitf2gcN9uHH-ZSyJ5OdT8O5M0
To: sip:charles@voice.example.com;tag=LmUY79rIdBQiiSakML4F0lHl271VdUn8
Call-ID: qM3W-fMrzPsvcjRSD1okEp5nbgHCF5Hu
CSeq: 16667 ACK
Route: <sip:voice.example.com;transport=tls;lr>
Content-Length: 0
Now kamailio should absorb this ACK, as it has already sent its
per-hop ACK. Instead I see
ERROR: <core> [core/forward.c:541]: forward_request(): cannot forward
to af 2, proto 3 no corresponding listening socket
I don't expect kamailio to forward anything at this point. The route
block is route[WITHINDLG] and it calls t_relay() normally.
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); # we should absorb this ACK, no?
exit;
}
4. If I remove the Path proxy and kamailio is the TLS proxy at
voice.example.com the call flow works perfectly.
The ACK from caller (david) is absorbed.
5. Regular calls, when UA2 accepts the call, work fine. In-dialog
requests for BYE, from both UAs, work
correctly with this Path proxy. Each UA has the complete 5 element
route set( 2 x Path proxy + kamailio + 2 x Path proxy).
The working route set looks like this:
BYE sip:david@192.168.1.17:44925;transport=TCP;ob SIP/2.0
Via: SIP/2.0/TLS
192.168.1.7:37309;rport;branch=z9hG4bKPjHdUtaUL5AfRcV-SX1Puya4niJKOOQ4VQ;alias
Max-Forwards: 70
From: <sip:charles@voice.example.com>;tag=6zOt.H7w8NL5njV7klwGLlSJy.U5yBC9
To: <sip:david@voice.example.com>;tag=Pa0ORUxA-7lK0BnR4pLJ5n8rn2OvQrJy
Call-ID: 3gWy4Q7O.-zQ-I07lRKHyFyX6azyCSwG
CSeq: 12855 BYE
Route: <sip:voice.example.com;transport=tls;lr;r2=on>
Route: <sip:192.168.122.100;lr;r2=on>
Route: <sip:192.168.122.99:5064;lr>
Route: <sip:192.168.122.100;lr;r2=on>
Route: <sip:voice.example.com;transport=tls;lr;r2=on>
User-Agent: basesip 1.0.0
Content-Length: 0
Any ideas?
Anthony Alba
Hello,
I note that I can use the ndb_redis server config parameter to specify connection details for my redis servers; I also note that the connection string can specify a “db” parameter which can be set from 0 to 9, with the default being 0.
I am looking for a way to dynamically set the db parameter. I do not which to add the same server with different names N times just to select a different db and having N times more connections to it than necessary.
It looks as though I can call redis_cmd(“svrN”, “SELECT dbN”, “init”); but will that propagate properly and set the correct db for all connections to my redis server for the lifetime of the request?
Ideally, I’d like to be able to specify an avp for the db, or have a function to set the db per request.
With every blessing,
—
Daniel Donoghue