Hi all,
I am querying mysql db inside routing block in kamailio.cfg
ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on
query: Unknown column '8d77' in 'where clause' (1054)
Aug 7 18:09:22 localhost /usr/local/sbin/kamailio[25333]: ERROR: <core>
[db_query.c:181]: db_do_raw_query(): error while submitting query
Aug 7 18:09:22 localhost /usr/local/sbin/kamailio[25333]: ERROR: sqlops
[sql_api.c:265]: sql_do_query(): cannot do the query [select * from
vca_asterisk where front_id=8d77]
I'm getting the above error message when, variable front_id=8d77 is
alphanumeric.
It's working fine when front_id is pure numeric. eg: front_id=877
Database column front_id is VARCHAR(255).
Any suggestions to solve this error?
Thanks,
Arish
Hello!
we have kamailio 5.2.3 and openssl 1.1.0f.
wss connections incoming to kamailio and outgoing sip connections, after
some time http request check not getting answer from kamailio. Netstat show
increase recieve tcp buffer on connections of kamailio.
We set up script which after not response of http check, run SIGSEGV of
main process of kamailio.
gdb) bt full
#0 0x00007fb779279450 in futex_wait (private=<optimized out>, expected=1,
futex_word=0x7fb6f78cb964) at ../sysdeps/unix/sysv/linux/futex-internal.h:61
__ret = -512
err = <optimized out>
#1 futex_wait_simple (private=<optimized out>, expected=1,
futex_word=0x7fb6f78cb964) at ../sysdeps/nptl/futex-internal.h:135
No locals.
#2 __pthread_rwlock_wrlock_slow (rwlock=0x7fb6f78cb958) at
pthread_rwlock_wrlock.c:67
waitval = 1
result = 0
futex_shared = <optimized out>
#3 0x00007fb77995eee9 in CRYPTO_THREAD_write_lock () from
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
No symbol table info available.
#4 0x00007fb779907896 in ?? () from
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
No symbol table info available.
#5 0x00007fb77990807e in CRYPTO_free_ex_data () from
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
No symbol table info available.
#6 0x00007fb779c65a09 in SSL_free () from
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
#7 0x00007fb777c022d6 in tls_h_tcpconn_clean (c=0x7fb6fbb73d58) at
tls_server.c:655
extra = 0x7fb6fba1a6d0
__func__ = "tls_h_tcpconn_clean"
#8 0x0000559ddff2966f in _tcpconn_free (c=0x7fb6fbb73d58) at
core/tcp_main.c:1339
__func__ = "_tcpconn_free"
#9 0x0000559ddff3c5f7 in tcpconn_put_destroy (tcpconn=0x7fb6fbb73d58) at
core/tcp_main.c:3017
__func__ = "tcpconn_put_destroy"
#10 0x0000559ddff3e0f2 in send_fd_queue_run (q=0x559de0518bc0
<send2child_q>) at core/tcp_main.c:3210
p = 0x7fb77e19e2c8
t = 0x7fb77e19e2c8
__func__ = "send_fd_queue_run"
#11 0x0000559ddff4f61c in tcp_main_loop () at core/tcp_main.c:4548
si = 0x0
r = 10
__func__ = "tcp_main_loop"
#12 0x0000559ddfe4e85d in main_loop () at main.c:1753
i = 3
pid = 0
si = 0x0
si_desc = "udp receiver child=2 sock=127.0.0.1:5060
(127.0.0.1:5060)\000\065\060\066\060)\000\000\000\000\200\000\000\000\000\000\000\000\002\000\000\000\000\006\000\000\000\000\000\000\000O
\254\177\267\177\000\000p\324\067?\375\177\000\000\060\000\000\000\060\000\000\000\020\325\067?\375\177\000\000\360k\255}\267\177\000"
nrprocs = 3
woneinit = 1
__func__ = "main_loop"
#13 0x0000559ddfe554ce in main (argc=13, argv=0x7ffd3f37d7a8) at main.c:2696
cfg_stream = 0x559de1c10010
c = -1
r = 0
tmp = 0x7ffd3f37deba ""
tmp_len = 32765
port = 1060623840
proto = 32695
options = 0x559de01c2a50
":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 = 33232859
---Type <return> to continue, or q <return> to quit---
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x0
p = 0xf0b5ff <error: Cannot access memory at address 0xf0b5ff>
st = {st_dev = 19, st_ino = 13222, st_nlink = 2, st_mode = 16832, st_uid =
108, st_gid = 112, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize =
4096, st_blocks = 0, st_atim = {
tv_sec = 1560780032, tv_nsec = 539855841}, st_mtim = {tv_sec = 1565076521,
tv_nsec = 998570962}, st_ctim = {tv_sec = 1565076521, tv_nsec = 998570962},
__glibc_reserved = {0, 0, 0}}
__func__ = "main"
Maybe our problem correlate with
https://github.com/kamailio/kamailio/issues/1860
Hey all,
I’m setting up a dev-7 (bd477f) server to test as per the other thread, however I’m getting the following loading my config:
ERROR: app_ruby [app_ruby_api.c:465]: sr_kemi_ruby_exec_func_ex(): invalid ruby environment attributes or parameters
I’m unsure what this error means - are there expected environment variables or other values that must be set? I didn’t see this issue in dev-4.
I thought it might be not able to find the library, but I ran with debug=4 and saw:
DEBUG: app_ruby [app_ruby_api.c:193]: ruby_sr_init_child(): test execution without error
ERROR: app_ruby [app_ruby_api.c:107]: app_ruby_print_last_exception(): exception: undefined method `>' for false:FalseClass
I changed kamailio.cfg to load my generic routing script, and during the onreply_manage it runs:
scode = KSR::PV.get("$rs”)
This now returns false (which appears to be the second error above, I check if scode is > 599).
Has anything changed in the way ruby is loaded in dev-7? I’m using the same ruby/ruby-devel library versions on the same OS. I did this deploy the same with devel-4 a few weeks ago and this didn’t happen.
Thanks!
Andrew
Hello!
We have in configuration :
c <sr-users(a)lists.kamailio.org>hildren=3
tcp_children=30
But in 90-95% connections kamailio use one worker (one process) by
statitistics netstat -anp.
Why not using more other workers (processes) ?
Based on my tests, the memory leak is only exposed when you are using
domain attributes, which are stored in the domain_attrs table. I wanted to
see if anymore else is running into this issue.
*Reproducible use case:*
1) Insert the following into the database
insert into domain values (null,"aprilco.com","aprilco.com",now());
insert into domain_attrs values (null,"aprilco.com","pbx_type",0,"0",now());
insert into domain_attrs values (null,"aprilco.com","pbx_id",0,"65",now());
2) Open a new terminal window and execute:
watch "kamcmd core.shmmem"
3) Open up another terminal windows and execute:
while true; do kamcmd domain.reload; done
*Expected Results:*
You will see the shared memory being allocated, but never freed. The more
entries you have in the domain_attrs table, the faster it will run out of
memory.
Thanks,
*Mack Hendricks / Head of Support / dOpenSource*
web: http://dopensource.com
support: +888-907-2085
dSIPRouter <http://dsiprouter.org/> - GUI focused on implementing Kamailio
to provide SIP Trunking and PBX Hosting Services
Hello,
My name is Javier, I must first apologize for my little knowledge about
the tool and my poor English. I am trying to connect a functional core
network LTE with Kamailio and I have used the Polaris Networks Solution
that brings an iso with both functionalities.
The EPC is correctly configured and working because I can have data
connection in my UE, I have also activated all the IMS options in the
EPC: I have created the APN with ims identifier, the default carrier QCI
assigned is 5 (for SIP signaling), the MME has activated the option to
support IMS Voice over the PS session and the HSS and PCRF nodes are
configured with the interfaces at the addresses and ports Cx-HSS
127.0.0.1:3868 and Cx-PCRF 10.11.0.35:3868 .
There are several parameters that I do not know if it is necessary to
activate, for example, in the PCRF the customization of the QCI for the
media type, if I must include the OCS and OFCS as nodes, or if in the
profile of my APN I must include authentication by PDN AAA.
The configuration I use for the IMS is as follows:
imsrealm = net1.test
imsport = 5060
pcscfgmip = 10.77.0.35
pcscfgmipintf = eth6
pcscfrxip = 10.102.81.111
pcscfrxipintf = eth1
icscfmwip = 127.0.0.21
icscfmwipintf = lo:21
icscfcxip = 127.0.0.20
icscfcxipintf = lo:20
scscfmwip = 127.0.0.23
scscfmwipintf = lo:23
scscfcxip = 127.0.0.22
scscfcxipintf = lo:22
audiobandwidth = 64
videobandwidth = 128
epcrealm = epc.mnc001.mcc001.3gppnetwork.org
pcrfhost = pcrf2.morsecore
pcrfrxip = 10.11.0.35
pcrfrxport = 3868
hsshost = hss6.morsecore
hsscxdxip = 127.0.0.1
hsscxdxport = 3868
Both cores are running on the same machine but I have disabled the
option of PCRF Co-located with IMS to be able to edit the pcrf host name
since if I enable it it does not reach the peer pcrf.localhost even if
the DNS is well configured. My UE is not able to launch the REGISTER by
itself when it is going to make a call, so I am using the Google
IMSDroid application to be able to launch the SIP requests and check the
operation of the IMS. In the application of the UE the configuration is
as follows:
Identity: Alice
Public Identity: sip:<MSISDN>@net1.test (MSISDN=8800000451 configurado
previamente en el EPC)
Private Identity: sip:<IMSI>@net1.test (IMSI incluyendo MCC y MNC)
Password: alice
Realm: net1.test (Aunque no sé si debo poner aquí
epc.mnc001.mcc001.3gppnetwork.org, pero entonces la petición da error)
Network: Proxy-CSCF Host: 10.77.0.35:5060 Transport UDP and NO
Proxy-CSCF discovery.
So, I launch my request and the log of the P-CSCF node is as follows:
Aug 2 12:50:04 morsecore kamailio[53656]: INFO: <script>: REGISTER
(sip:8800000451@net1.test (10.77.0.196:37651) to
sip:8800000451@net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
Aug 2 12:50:04 morsecore kamailio[53656]: INFO: cdp
[authstatemachine.c:200]: auth_client_statefull_sm_process(): after
callback of event 1
Aug 2 12:50:04 morsecore kamailio[53802]: INFO: cdp
[authstatemachine.c:200]: auth_client_statefull_sm_process(): after
callback of event 7
Aug 2 12:50:04 morsecore kamailio[53655]: INFO: <script>: REGISTER
(sip:8800000451@net1.test (10.77.0.196:37651) to
sip:8800000451@net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
Aug 2 12:50:05 morsecore kamailio[53664]: INFO: <script>: REGISTER
(sip:8800000451@net1.test (10.77.0.196:37651) to
sip:8800000451@net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
Aug 2 12:50:07 morsecore kamailio[53659]: INFO: <script>: REGISTER
(sip:8800000451@net1.test (10.77.0.196:37651) to
sip:8800000451@net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
Aug 2 12:50:11 morsecore kamailio[53666]: INFO: <script>: REGISTER
(sip:8800000451@net1.test (10.77.0.196:37651) to
sip:8800000451@net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
I understand that everything is correct until now, but in the I-CSCF
node it appears:
Aug 2 12:50:04 morsecore kamailio[53397]: INFO: ims_icscf
[cxdx_uar.c:71]: create_uaa_return_code(): created AVP successfully :
[uaa_return_code]
Aug 2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
[cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_server_name: Failed finding
avp
Aug 2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
[cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_capabilities: Failed finding
avp
Aug 2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
[cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_result_code: Failed finding
avp
Aug 2 12:50:04 morsecore kamailio[53465]: ERROR: ims_icscf
[cxdx_uar.c:152]: async_cdp_uar_callback():
RC_IMS_DIAMETER_ERROR_USER_UNKNOWN
Aug 2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
[cxdx_uar.c:71]: create_uaa_return_code(): created AVP successfully :
[uaa_return_code]
Aug 2 12:50:04 morsecore kamailio[53465]: ERROR: <script>: UAR failure
- error response sent from module
Where I believe that the REGISTER message is not even forwarded, however
it seems that it gives an error that the user is unknown or not
registered but if I access the MySQL database, the registered users are:
+----+------------+-----------+----------+---------------+----------------------------------+----------------------------------+------+
| id | username | domain | password | email_address | ha1
| ha1b | rpid |
+----+------------+-----------+----------+---------------+----------------------------------+----------------------------------+------+
| 1 | alice | net1.test | alice | |
91cc8c652ef5f37e91c468c7319d0086 | 044776963e2661788e8db076b393333e |
NULL |
| 2 | bob | net1.test | bob | |
6ef7f9c924f1385d83cf22cbb94cfbbb | 0d893d2d8c10a044b918e4bd73b6bee5 |
NULL |
| 3 | 8800000451 | net1.test | alice | |
46811c4e58f298953a6f9efccf6c32f1 | 49c7a7ad84fe797fbefa2185be4cd226 |
NULL |
+----+------------+-----------+----------+---------------+----------------------------------+----------------------------------+------+
However, I do not know if it is accessing the mounted MySQL database or
accessing the HSS and on this node, in the databases it does not contain
the user (although it must be because it is registered in the network
correctly).
In case it works, this is the trace of wireshark filtered by the
protocols S1AP, SIP and Diameter just when a REGISTER request is
launched:
"596","2019-08-02
12:50:00.705985000","127.0.0.20","127.0.0.1","DIAMETER","130","cmd=Device-Watchdog
Request(280) flags=R--- appl=Diameter Common Messages(0) h2h=fedcb89
e2e=4df0bbf5 | "
"597","2019-08-02
12:50:00.706133000","127.0.0.1","127.0.0.20","DIAMETER","210","cmd=Device-Watchdog
Answer(280) flags=---- appl=Diameter Common Messages(0) h2h=fedcb89
e2e=4df0bbf5 | "
"599","2019-08-02
12:50:00.786878000","127.0.0.22","127.0.0.1","DIAMETER","130","cmd=Device-Watchdog
Request(280) flags=R--- appl=Diameter Common Messages(0) h2h=fedcb89
e2e=4df0bbf5 | "
"600","2019-08-02
12:50:00.787019000","127.0.0.1","127.0.0.22","DIAMETER","210","cmd=Device-Watchdog
Answer(280) flags=---- appl=Diameter Common Messages(0) h2h=fedcb89
e2e=4df0bbf5 | "
"602","2019-08-02
12:50:00.914405000","10.102.81.111","10.11.0.35","DIAMETER","130","cmd=Device-Watchdog
Request(280) flags=R--- appl=Diameter Common Messages(0) h2h=fedcb89
e2e=4df0bbf5 | "
"603","2019-08-02
12:50:00.914549000","10.11.0.35","10.102.81.111","DIAMETER","214","cmd=Device-Watchdog
Answer(280) flags=---- appl=Diameter Common Messages(0) h2h=fedcb89
e2e=4df0bbf5 | "
"622","2019-08-02 12:50:04.027238000","10.77.0.196","10.77.0.35","GTP
<SIP>","1034","Request: REGISTER sip:net1.test (1 binding) | "
"623","2019-08-02 12:50:04.027347000","10.77.0.196","10.77.0.35","GTP
<SIP>","1034","Request: REGISTER sip:net1.test (1 binding) | "
"624","2019-08-02
12:50:04.027448000","10.77.0.196","10.77.0.35","SIP","998","Request:
REGISTER sip:net1.test (1 binding) | "
"625","2019-08-02
12:50:04.028850000","10.102.81.111","10.11.0.35","DIAMETER","426","cmd=AA
Request(265) flags=RP-- appl=3GPP Rx(16777236) h2h=fedcb8a e2e=4df0bbf6
| "
"626","2019-08-02
12:50:04.029862000","10.11.0.35","10.102.81.111","DIAMETER","350","cmd=AA
Answer(265) flags=-P-- appl=3GPP Rx(16777236) h2h=fedcb8a e2e=4df0bbf6 |
"
"630","2019-08-02
12:50:04.031113000","10.77.0.35","127.0.0.21","SIP","1280","Request:
REGISTER sip:net1.test (1 binding) | "
"631","2019-08-02
12:50:04.031794000","127.0.0.21","10.77.0.35","SIP","440","Status: 100
Trying | "
"632","2019-08-02
12:50:04.032382000","127.0.0.20","127.0.0.1","DIAMETER","354","cmd=User-Authorization
Request(300) flags=RP-- appl=3GPP Cx(16777216) h2h=fedcb8a e2e=4df0bbf6
| "
"633","2019-08-02
12:50:04.033101000","127.0.0.1","127.0.0.20","DIAMETER","298","cmd=User-Authorization
Answer(300) flags=-P-- appl=3GPP Cx(16777216) h2h=fedcb8a e2e=4df0bbf6 |
"
"636","2019-08-02
12:50:04.033557000","127.0.0.21","10.77.0.35","SIP","504","Status: 403
Forbidden - HSS User Unknown | "
I don't know if any information or configuration details are missing but
I can attach it at any time without any problem.
Regards and thank you very much in advance,
Javier Espinosa.