Hello guys,
I'm trying to call an xmlrpc method with parameters like:
<?xml version="1.0"?>
<methodCall>
<methodName>dispatcher.set_state</methodName>
<params>
<param>
<value><string>state:i</string></value>
</param>
<param>
<value><string>group:1</string></value>
</param>
<param>
<value><string>sip:1.2.3.4:5060</string></value>
</param>
</params>
</methodCall>
I'm getting back "Invalid Parameters".
I can't find any documentation as to _how_ to call it with parameters.
Can anyone help?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
ᐧ
Hi all,
I have kamailio setup that uses a mongo cluster, and everything works fine. Only I have problems with the avpops module. The avp_db_load fails with "field [attribute] not found in result iterator", even if the attribute field is present in the object in mongo. Does anybody know what could be going wrong?
Thanks in advance, and kind regards,
===============================================================================
kamailio.cfg:
...
# ---- avpops params ----
modparam("avpops", "db_url", DBURL)
modparam("avpops", "avp_table", "usr_preferences")
...
xlog("trying avp_db_load\n");
if (avp_db_load("$fu/username", "$avp(s:attributevalue)")) {
xlog("if succeeded\n");
}
xlog("if not succeeded\n");
...
===============================================================================
mongo:
rs:SECONDARY> db.usr_preferences.find({"username":"1234567890"})
{ "_id" : ObjectId("5ab22a5b384cd2aa0d4cf403"), "attribute" : "attributevalue", "username" : "1234567890", "domain" : null, "value" : "750", "uuid" : "", "type" : 0 }
===============================================================================
syslog:
...
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: <script>: trying avp_db_load
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:851]: db_mongodb_query(): query to collection [usr_preferences]
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:885]: db_mongodb_query(): query filter: { "username" : "1234567890", "attribute" : "attributevalue" }
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:904]: db_mongodb_query(): columns filter: { "value" : 1, "attribute" : 1, "type" : 1 }
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:116]: db_new_result(): allocate 56 bytes for result set at 0x7f43b613c480
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:349]: db_mongodb_get_columns(): 3 columns returned from the query
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:154]: db_allocate_columns(): allocate 24 bytes for result names at 0x7f43b613c318
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:165]: db_allocate_columns(): allocate 12 bytes for result types at 0x7f43b614d888
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[0] named: value
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:396]: db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f43b614d9b8
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:431]: db_mongodb_get_columns(): use DB1_STRING result type
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:460]: db_mongodb_get_columns(): RES_NAMES(0x7f43b614d9b8)[0]=[value] (2)
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[1] named: attribute
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:381]: db_mongodb_get_columns(): field [attribute] not found in result iterator
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:739]: db_mongodb_store_result(): failed to set the columns
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:918]: db_mongodb_query(): failed to store result
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: db_mongodb [mongodb_dbase.c:927]: db_mongodb_query(): failed to do the query
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 3 columns
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7f43b614d9b8
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:92]: db_free_columns(): freeing result names at 0x7f43b613c318
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:97]: db_free_columns(): freeing result types at 0x7f43b614d888
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7f43b613c480
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: avpops [avpops_impl.c:381]: ops_dbload_avps(): db_load failed
Mar 21 17:15:16 ccccc /opt/kamailio/sbin/kamailio[2544]: ERROR: <script>: if not succeeded
...
===============================================================================
Hello,
I’ve installed kamailio 5.1 but when I run:
kamctl dispatcher reload
I get:
{
"jsonrpc": "2.0",
"error": {
"code": 500,
"message": "Method Not Found"
},
"id": 31222
}
How do I fix this?
Thanks,
Arik Halperin
I am using Captagent on 2 sip servers communicating with each other.
Both Captagents then route the SIP traffic to the same Kamailio.
Therefore, if I understand, Kamailio will get every msg between them twice.
Once from server A and once from server B.
Let's say that each of them has a different capturing code (100 for server
A and 200 for server B)
How will the data look in the DB?
Will it hold both entries pretty much the same with a difference is some
fields such as the capture node?
Thanks a lot,
Amit
--
*Amit Zigelman* | *Software Developer*
Mobile (+972) 54-570-9129 <+972%254-570-9129> | amit.zigelman(a)vonage.com
When I connect using mongo, the credentials work:
$ mongo kamailio -u "kam" -p "kam"
MongoDB shell version v3.4.9
connecting to: mongodb://127.0.0.1:27017/kamailio
MongoDB server version: 3.4.9
> db.subscriber.find()
{ "_id" : ObjectI ...
But when I use the following DBURL in kamailio.cfg, kamailio fails to even login to mongo:
#!define DBURL "mongodb://kam:kam@localhost/kamailio"
If I disable mongodb authentication, kamailio starts up just fine again. Any idea what's going wrong here?
Greetings,
I have a doubt about the flag 16 used in nat_uac_test() belonging to the
module NATDETECT.
In the documentation, the following is stated :
*16* - Test if the source port is different from the port in the “Via”
header
I have some situations that I receive a request from port 5060 and the Via
Header contains no port. I think it probably assumes that it is the default
port.
Will this situation trigger the "16" flag ?
Thanks in advance,
Cheers
Hello guys,
I want to execute an sql only for INITIAL INVITEs, I'm trying like:
#!ifdef WITH_DID_VALIDATE
if(!has_totag()) {
sql_query("acd", "select * from did_numbers where didNumber =
'$tU' and active = 'Y'", "ra");
xlog("L_ERR", "[REQUEST_ROUTE] number of rows in table domain:
$dbr(ra=>rows)\n");
if( $dbr(ra=>rows)==0 ) {
xlog("L_ERR", "[REQUEST_ROUTE] DID Number validation
returned [$dbr(ra=>rows)], not responding to this request\n");
exit;
}
sql_result_free("ra");
}
#!endif
But, say I remove the DID from the allowed list while a call is going on.
Then responses to the allowed INVITE would not be processed.
How would I limit that to ONLY the INITIAL INVITE? Should I use has_totag?
Thanks!
David
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
ᐧ
Hello,
as already announced from Daniel-Constantin Mierla on the lists last Wednesday
[1], we strongly advise you to update your Kamailio installation to the latest
stable release for security reasons.
All supported releases (4.4, 5.0. and 5.1) contains two important security
fixes related to the tmx and lcr module.
Technical details for the tmx issue:
A specially crafted REGISTER message with a malformed branch or From tag
triggers a so called "off-by-one heap overflow". This vulnerability existed in
the tmx module and makes it possible to remotely crash the Kamailio service.
If an attacker sends many of this messages this would lead to a Denial of
Service of the attacked infrastructure. This is especially critical as no
authentication for the remote source is needed.
This vulnerability was found from Sandro Gauci and Alfred Farrugia from the
Security Company Enable Security. Many thanks to them for finding the issue
and reporting it to us.
You find all the details including a proof of concept code in the published
security announcement from them:
https://github.com/EnableSecurity/advisories/tree/master/ES2018-05-kamailio…
Technical details for the lcr issue:
A vulnerability existed in the lcr next_gw() function. It happens when
a very long R-URI username is sent with an INVITE due to an mistake in the
function error code handling. It can be triggered from a remote source, but
should be only from a trusted peer, as it expected that calls going
through lcr are authenticated by user or IP address.
This vulnerability was reported from an user in the Netherlands to us, thanks
as well for the bug report.
So far we are not aware of any public exploits of this errors. But as already
mentioned, we advise you to update your Kamailio servers to the latest stable
release as soon as possible, especially as the tmx vulnerability will reported
to more security lists later today.
Please address any detailed technical questions related to the two bugs to the
developer list at sr-dev(a)lists.kamailio.org .
In case of confidential remarks related to this or other security issues,
please address them to the Kamailio Management at management(a)kamailio.org .
Best regards,
Henning Westerholt
Kamailio Project
[1] https://lists.kamailio.org/pipermail/sr-users/2018-March/100672.html