>On 22/02/2017 14:35, hsdsdssdfsdf dsasd wrote:
>> I implemented call forwarding according to
>> https://www.kamailio.org/wiki/tutorials/mini-howto-admin/call_forwarding,
>> which is working fine. When I replace db_mysql with db_mongodb
>> however, I receive an error on "if (avp_db_load("$ruri/username",
>> "$avp(s:fwd_blind)")) {":
>>
>> ERROR: db_mongodb [mongodb_dbase.c:381]: db_mongodb_get_columns():
>> field [attribute] not found in result iterator
>> ERROR: db_mongodb [mongodb_dbase.c:739]: db_mongodb_store_result():
>> failed to set the columns
>> ERROR: db_mongodb [mongodb_dbase.c:918]: db_mongodb_query(): failed to
>> store result
>> ERROR: db_mongodb [mongodb_dbase.c:927]: db_mongodb_query(): failed to
>> do the query
>> ERROR: avpops [avpops_impl.c:381]: ops_dbload_avps(): db_load failed
>can you set debug=3 in kamailio.cfg, restart kamailio and test again?
>Then grab the log messages from syslog and send them here. It should
>provide more debug information.
>
>Is there a record for this query? Or should be an empty response (no
>record returned)?
>
>Cheers,
>Daniel
I used the following to store a forward:
avp_db_store("$from/username","$avp(s:fwd_blind)");
Which in this case resulted in (after replacing the true forward info):
> db.usr_preferences.find()
{ "_id" : ObjectId("58ac40f7e498420e0703a2e1"), "uuid" : "", "attribute" : "fwd_blind", "value" : "sip:0003@x.x.x;user=phone", "type" : 0, "username" : "0002", "domain" : null }
After setting:
debug=3
...
xlog("bla00");
if (avp_db_load("$ruri/username", "$avp(s:fwd_blind)")) {
xlog("bla01"
...
}
xlog("bla02");
...
The syslog shows (after replacing the true username):
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: <script>: bla00
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:851]: db_mongodb_query(): query to collection [usr_preferences]
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:885]: db_mongodb_query(): query filter: { "username" : "0002", "attribute" : "fwd_blind" }
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:904]: db_mongodb_query(): columns filter: { "value" : 1, "attribute" : 1, "type" : 1 }
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:116]: db_new_result(): allocate 56 bytes for result set at 0x7fa03e54a6a0
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:349]: db_mongodb_get_columns(): 3 columns returned from the query
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:154]: db_allocate_columns(): allocate 24 bytes for result names at 0x7fa03e54a798
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:165]: db_allocate_columns(): allocate 12 bytes for result types at 0x7fa03e549848
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[0] named: value
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:396]: db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7fa03e549798
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:431]: db_mongodb_get_columns(): use DB1_STRING result type
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:460]: db_mongodb_get_columns(): RES_NAMES(0x7fa03e549798)[0]=[value] (2)
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[1] named: attribute
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: db_mongodb [mongodb_dbase.c:381]: db_mongodb_get_columns(): field [attribute] not found in result iterator
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: db_mongodb [mongodb_dbase.c:739]: db_mongodb_store_result(): failed to set the columns
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: db_mongodb [mongodb_dbase.c:918]: db_mongodb_query(): failed to store result
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: db_mongodb [mongodb_dbase.c:927]: db_mongodb_query(): failed to do the query
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 3 columns
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7fa03e549798
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:92]: db_free_columns(): freeing result names at 0x7fa03e54a798
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:97]: db_free_columns(): freeing result types at 0x7fa03e549848
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7fa03e54a6a0
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: avpops [avpops_impl.c:381]: ops_dbload_avps(): db_load failed
Feb 24 10:42:18 slb04 /usr/local/sbin/kamailio[20311]: ERROR: <script>: bla02
When changing to db_mysql the error does not occur. I got the following record there:
MariaDB [kamailio]> select * from usr_preferences;
+----+------+-------------+--------+-----------+------+-------------------------------------------+---------------------+
| id | uuid | username | domain | attribute | type | value | last_modified |
+----+------+-------------+--------+-----------+------+-------------------------------------------+---------------------+
| 26 | | 0002 | | fwd_blind | 0 | sip:0003@x.x.x;user=phone | 1900-01-01 00:00:01 |
+----+------+-------------+--------+-----------+------+-------------------------------------------+---------------------+
With the same kamailio.cfg (except for replacing mongodb with mysql) resulting in:
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: ERROR: <script>: bla00
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:116]: db_new_result(): allocate 56 bytes for result set at 0x7fd17c349800
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:66]: db_mysql_get_columns(): 3 columns returned from the query
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:154]: db_allocate_columns(): allocate 24 bytes for result names at 0x7fd17c32f400
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:165]: db_allocate_columns(): allocate 12 bytes for result types at 0x7fd17c33fae8
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:84]: db_mysql_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7fd17c349350
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:91]: db_mysql_get_columns(): RES_NAMES(0x7fd17c349350)[0]=[value]
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:135]: db_mysql_get_columns(): use DB1_STRING result type
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:84]: db_mysql_get_columns(): allocate 16 bytes for RES_NAMES[1] at 0x7fd17c349458
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:91]: db_mysql_get_columns(): RES_NAMES(0x7fd17c349458)[1]=[attribute]
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:135]: db_mysql_get_columns(): use DB1_STRING result type
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:84]: db_mysql_get_columns(): allocate 16 bytes for RES_NAMES[2] at 0x7fd17c3493a8
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:91]: db_mysql_get_columns(): RES_NAMES(0x7fd17c3493a8)[2]=[type]
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: db_mysql [km_res.c:99]: db_mysql_get_columns(): use DB1_INT result type
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:184]: db_allocate_rows(): allocate 16 bytes for rows at 0x7fd17c33fb98
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_row.c:117]: db_allocate_row(): allocate 96 bytes for row values at 0x7fd17c33f778
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_val.c:118]: db_str2val(): converting STRING [sip:0003@x.x.x;user=phone]
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_val.c:118]: db_str2val(): converting STRING [fwd_blind]
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: avpops [avpops_impl.c:132]: dbrow2avp(): db_flags=3, flags=12
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: avpops [avpops_db.c:265]: db_close_query(): close avp query
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 3 columns
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7fd17c349350
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[1] at 0x7fd17c349458
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[2] at 0x7fd17c3493a8
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:92]: db_free_columns(): freeing result names at 0x7fd17c32f400
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:97]: db_free_columns(): freeing result types at 0x7fd17c33fae8
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:52]: db_free_rows(): freeing 1 rows
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_row.c:95]: db_free_row(): freeing row values at 0x7fd17c33f778
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:60]: db_free_rows(): freeing rows at 0x7fd17c33fb98
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7fd17c349800
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: DEBUG: avpops [avpops_impl.c:415]: ops_dbload_avps(): loaded avps = 1
Feb 24 11:27:51 slb04 /usr/local/sbin/kamailio[21056]: ERROR: <script>: bla01
Ok, thanks Daniel.
Tonight, I will activate ipv6 again and review the kamailio process with ps auxw.
when I make a /etc/init.d/networking restart , kamailio still working and processing calls without problems (this night I make the test).
thanks
--------------------------------
Ángel Elena Medina _o)
craem(a)craem.net / \\
http://blog.craem.net _(___V
@craem_
--------------------------------
-----Mensaje original-----
De: Daniel-Constantin Mierla <miconda(a)gmail.com>
Enviado: Mar 18-04-2017 14:50
Asunto: Re: [SR-Users] IPV6 kamailio 4.0.2
Para: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>;
> Hello,
>
>
>
> I think there is some problem and kamailio is not actually running after you
> start it so the fifo file is created.
>
>
>
> Can you do 'ps auxw | grep kamailio' after you start kamailio with ipv6 and see
> if it is running?
>
>
> Cheers,
> Daniel
>
>
> On 17.04.17 16:20, Angel Elena wrote:
>
>
>
> Hello, good moorning.
>
> I have a Kamailio 4.0.2 with debian 7.0 and this days I'm configuring dual
> stack ipv4 & ipv6 in all servers.
>
> I have configured ipv6 today in my kamailio server and when I make a
> /etc/init.d/networking restart, everything seems to be working fine (ipv6
> works), but when I make a "kamctl mi dlg_list", the next error appears:
>
> root@sipproxy:/etc/network# kamctl mi dlg_list
> ERROR: Error opening Kamailio's FIFO /tmp/kamailio_fifo
> ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
> "/tmp/kamailio_fifo")' in your config
> ERROR: and also have loaded the mi_fifo module.
>
> Disable ipv6 and now works fine.
>
>
> restart kamailio service is "complicated" to test anythink.
>
> Any ideas ?
>
> thanks
>
> --------------------------------
> Ángel Elena Medina _o)
> craem(a)craem.net / \\
> http://blog.craem.net _(___V
> @craem_
> --------------------------------
>
>
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users(a)lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
>
> _______________________________________________
>
> Kamailio (SER) - Users Mailing List
>
> sr-users(a)lists.kamailio.org
>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
Hello, good moorning.
I have a Kamailio 4.0.2 with debian 7.0 and this days I'm configuring dual stack ipv4 & ipv6 in all servers.
I have configured ipv6 today in my kamailio server and when I make a /etc/init.d/networking restart, everything seems to be working fine (ipv6 works), but when I make a "kamctl mi dlg_list", the next error appears:
root@sipproxy:/etc/network# kamctl mi dlg_list
ERROR: Error opening Kamailio's FIFO /tmp/kamailio_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
Disable ipv6 and now works fine.
restart kamailio service is "complicated" to test anythink.
Any ideas ?
thanks
--------------------------------
Ángel Elena Medina _o)
craem(a)craem.net / \\
http://blog.craem.net _(___V
@craem_
--------------------------------
I tried to install kamailio mysql db on Debian Stretch. Create of
domain_attrs table failed with this kind of error message:
ERROR 1071 (42000) at line 26: Specified key was too long; max key length is 767 bytes
domain-create.sql contains this:
CREATE TABLE `domain_attrs` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
`did` VARCHAR(64) NOT NULL,
`name` VARCHAR(32) NOT NULL,
`type` INT UNSIGNED NOT NULL,
`value` VARCHAR(255) NOT NULL,
`last_modified` DATETIME DEFAULT '2000-01-01 00:00:01' NOT NULL,
CONSTRAINT domain_attrs_idx UNIQUE (`did`, `name`, `value`)
);
Looks like default charset is something (e.g. utf8), where one char takes
more than 1 byte and 767 limit is exceeded.
Any suggestions on how to solve this?
-- Juha
Hello all,
I can't find any answer why my kamcli doesn't function.
I'm using Kamailio 5.0.0 at the Debian Jessy 8.7 and it functions well.
# kamctl ul show
functions well but when I use kamcli I get error:
# kamcli ul show
13(7452) ERROR: jsonrpcs [jsonrpcs_sock.c:542]: jsonrpc_dgram_send_data(): failed to send the response - ret: -1, len: 2443 (131072), err: 1 - Operation not permitted)
(log): Timeout receiving response on unix sock
The relevant parts of kamailio.cfg:
#------------------------------------------------------------------------
#!define WITH_DEBUG
#!define WITH_NAT
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
loadmodule "jsonrpcs.so"
# ----- jsonrpcs params -----
modparam("jsonrpcs", "pretty_format", 1)
/* set the path to RPC fifo control file */
modparam("jsonrpcs", "fifo_name", "/var/run/kamailio/kamailio_rpc.fifo")
/* set the path to RPC unix socket control file */
modparam("jsonrpcs", "dgram_socket", "/var/run/kamailio/kamailio_rpc.sock")
# ----- ctl params -----
modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")
#--------------------------------------------------------------------------
# ll /var/run/kamailio/
total 0
srw------- 1 root root 0 Mar 22 11:36 kamailio_ctl
prw-rw---- 1 root root 0 Mar 22 12:30 kamailio_rpc.fifo
srw-rw---- 1 root root 0 Mar 22 11:36 kamailio_rpc.sock
Can somebody tell me what is the problem?
Thank you!
Regards
Marko
Hello,
for a while in the past (like 2008-2011) the
kamailio-announce(a)lists.kamailio.org mailing list was used for very
sporadic announcements:
- https://lists.kamailio.org/cgi-bin/mailman/listinfo/kamailio-announce
It was intended to be used to announce only relevant news about the
project (releases, major events, etc.), which most of them go also on
sr-users, but targeting community members than which prefer to avoid
high traffic, which is specific for the usual discussions here. Also,
for people in sr-users, can be a place to spot easier the major
announcements.
Because we migrated back to lists.kamailio.org domain, this list is now
presented on the page of mailman index:
- https://lists.kamailio.org/cgi-bin/mailman/listinfo
I just marked it as 'inactive', but I am wondering if it should be
revived somehow (as some people wanted to have a place where to inform
about relevant security issues, etc...) or be closed (removed/made
private). Even it was not used/promoted for more than 5 years, I noticed
that it has over 200 subscribers, therefore it seems to be enough people
interested in it.
Reply here if you consider it to be useful and eventually give some
suggestions for what kind of announcements should be used. Note that
there is already business(a)lists.kamailio.org (with larger subscriber
base) for business related announcement or discussions.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hi,
Using *advertised_address *core parameter in the kamailio script doesn't
update the address mentioned in the Record-Route header.
We see this problem in the 200 OK message (of the INVITE msg), where the
Record-Route header sent by the Kamailio contains socket address.
We're using kamailio 4.4.5 (x86_64/linux) 239f3c
Can you please tell if this core parameter is effective for changing the RR
header ?
Thanks
Best regards,
*MRIDUL*
I would like to place the customer connecting via SIP/MSRP on hold until I find the right destination.
What is the best way to do this?
One idea is to write a MSRP bot. Does anyone know how to go about this?
Other smart ideas?
Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>
Join us: [cid:image001.gif@01D1C9C9.C4E8B6D0] <https://www.facebook.com/pages/CyraCom-LLC/134704783312720> [cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom> [cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom> [cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>
[cid:image005.png@01D1C9C9.C4E8B6D0]
DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.
Hello, All!
We are using Kamailio as Webrtc to SIP proxy.
Clinet's Chrome browser needs to have rtcp-mux option to work correct, so
we are adding it in RTPENGINE->WS direction as:
rtpengine_manage("trust-address replace-origin
replace-session-connection *rtcp-mux-offer
rtcp-mux-accept* ICE=force RTP/SAVPF");
Also we need to remove it in RTPENGINE->PSTN direction, we are trying to do
it like this:
rtpengine_manage("trust-address replace-origin replace-session-connection
* rtcp-mux-demux* ICE=remove RTP/AVP");
But it does not work for us and a=rtcp-mux option in SDP goes to the SIP
provider.
Please help us to solve this!
BR,
Denys
PS.
Versions: Kamailio 4.4.5, rtpengine 5.2.1.0