I'm involved in setting up a Kamailio instance and was hoping to make use of the auth_ephemeral module for authentication. But the module documentation doesn't quite make clear how exactly the module is to be employed or the web service set up. Does anyone have a working example?
Regards,
Hemanshu Vadehra
hemanshu.v(a)directi.com
Hi all,
I'm switching my development environment from Linux to Mac.
Is there any tutorial on how to setup Kamailio on this OS? It may be an
Unix flavor, but it's still quite different from Linux :).
Thanks,
--
Carlos
http://caruizdiaz.comhttp://ngvoice.com
+52 55 3048 3303
Hello,
I’m attempting to deploy a homer sip capture server on SPARC and I’m seeing some strange date related errors:
ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on query: Incorrect datetime value: '2052-06-12 16:21:06' for column 'date' at row 1 (1292)
Is there some sore of endianness issue?
Thanks for any assistance!
Regards,
Spencer
Hi,
We are heavily using Kamailio in our product Sipwise NGCP and currently
testing possibility to provide rollback for the customers with the huge
systems as the last resort functionality in case if upgrade went wrong.
We hope never use it on practice but prefer to have such possibility.
The main logic here is to change DB in 'backward compatible' way.
So OLD code must work with NEW DB schema (but NOT a vice verse).
We have some rules which helps us care about it, like
"Do not drop columns, just discontinue them" and
"All new fields should have defaults", etc.
Also we have separated 'code', 'configs' and 'data' parts of our
product and rollback 'code'/'configs' only, while 'data' (e.g.
MySQL DB) stays in new state.
Otherwise rollback will require a lot if time to revert all DB
statements and sometimes it is just not possible.
While every time we have to upgrade Kamailio we have a problems with
rollback possibility.
The point here that Kamailio checks DB table_version and doesn't start
if the version mismatch found.
Q: What about to add Kamailio possibility to work in backward compatible
mode?
Sample for upgrade Kamailio 4.3.x -> 4.4.x (the versions here as an
example only!)
https://www.kamailio.org/wiki/install/upgrade/4.3.x-to-4.4.0
We have 3 DB statements there which are adding new columns to 3 tables, like
> -- table: active_watchers
> ALTER TABLE active_watchers
> ADD COLUMN flags INT(11) NOT NULL DEFAULT '0',
> ADD COLUMN user_agent VARCHAR(255) NOT NULL;
> DELETE FROM version WHERE TABLE_NAME='active_watchers';
> INSERT INTO version (`table_name`, `table_version`) VALUES
('active_watchers','12');
Problem here is missed default for column 'user_agent' which can be
empty value as for me.
So, lets assume we have it there. Then we can add new column to table
'version', like that:
> mysql> select * from version where table_name='active_watchers';
> +-----------------+---------------+---------------------+
> | table_name | table_version | table_compatibility |
> +-----------------+---------------+---------------------+
> | active_watchers | 12 | 11 |
> +-----------------+---------------+---------------------+
> 1 row in set (0.00 sec)
Currently:
- module presence version 4.4.x starts check required version and
refuse to load if table_version!=12
Proposed behaviour:
- module presence version 4.4.x starts check required version and
refuse to load if table_version!=12 and compatibility option is not set
- if compatibility option is set, check value of table_compatibility
and refuse to load if current version less then table_compatibility value
>From the sample above I would say module presence in Kamailio 4.4.x is
compatible with Kamailio 4.3.x if we define default value for the field
'user_agent'.
Having that will allow us to rollback on previous NGCP release and
_temporary_ work on Kamailio 4.3.x having new Kamailio DB 4.4.x
P.S. This is just a question to check Kamailio community vision here and
reality is more complex as described,
so some additional checks/limitations will be in place.
P.P.S Compatibility Kamailio option can/should be disabled by default.
Field 'table_compatibility' can be outside table 'version', e.g. in
separate table.
Complete compatibility logic can be some separate Kamailio
'compatibility' module.
Thank you!
--
Alexander Lutay
Head of Quality Assurance
Sipwise GmbH, Campus 21/Europaring F15
AT-2345 Brunn am Gebirge
Office: +43(0)13012036
Email: alutay(a)sipwise.com
Website: https://www.sipwise.com
Meet us @ ANGACOM: Hall 10.1 / booth N10
Exhibition and Congress for Broadband,
Cable & Satellite: 07 – 09 June, 2016 in Cologne
Hello,
we are trying to connect our Kamailio SIP to an Oracle database. We tried
both db_oracle and db_unixodbc modules to connect to the DB.
With db_oracle, Kamailio core dumps when trying to access the
active_watchers table (caused by the oracle CLOB?). Here is the kamailio
logs:
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: <core>
[db_query.c:131]: db_do_query_internal(): DB-QUERY: select
presentity_uri,callid,to_tag
,from_tag,event from active_watchers where updated=:1 AND event=:2
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN PRESENTITY_URI TYPE 4 SIZE 129
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN CALLID TYPE 4 SIZE 256
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN TO_TAG TYPE 4 SIZE 65
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN FROM_TAG TYPE 4 SIZE 65
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:238]: get_columns(): COLUMN EVENT TYPE 4 SIZE 65
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23665]: INFO: db_oracle
[res.c:378]: get_rows(): OCIStmtFetch2() returned 100
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23667]: CRITICAL: <core>
[pass_fd.c:275]: receive_fd(): EOF on 16
Apr 29 13:54:53 newvm1 /usr/sbin/kamailio[23667]: CRITICAL: <core>
[pass_fd.c:275]: receive_fd(): EOF on 14
What is really strange is that this table is accessed several times before
the crash, without any problem. The other point is that this table is
absolutely empty...
With db_unixodbc, all requests having dates check fail because because the
date format is not understood by oracle. The date should be converted using
the oracle to_date(date, format) funtion to work...
Here are the Kamilio traces:
Apr 29 14:10:38 newvm1 /usr/sbin/kamailio[17021]: ERROR: usrloc
[dlist.c:183]: get_all_db_ucontacts(): query error
Apr 29 14:10:38 newvm1 /usr/sbin/kamailio[17021]: ERROR: nathelper
[nathelper.c:2089]: nh_timer(): failed to fetch contacts
Apr 29 14:10:39 newvm1 /usr/sbin/kamailio[17021]: ERROR: db_unixodbc
[dbase.c:133]: db_unixodbc_submit_query(): rv=-1. Query= select
received,contact,socket,cflags,path,ruid from$
Apr 29 14:10:39 newvm1 /usr/sbin/kamailio[17021]: ERROR: db_unixodbc
[connection.c:220]: db_unixodbc_extract_error():
unixodbc:SQLExecDirect=HY000:1:933:[Oracle][ODBC][Ora]ORA-00$
Apr 29 14:10:39 newvm1 /usr/sbin/kamailio[17021]: ERROR: <core>
[db_query.c:132]: db_do_query_internal(): error while submitting query
I tried the option modparam("db_unixodbc", "use_escape_common", 1), but
without success.
Has anyone been able to make Kamailio 4.4.0 work with Oracle 11g, either
with db_oracle or with db_unixodbc module?
Regards
Giovanni
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-and-Oracle-database-tp1479…
Sent from the Users mailing list archive at Nabble.com.
Hi
Im trying to remove my Asterisk s= line on SDP but when doing:
sdp_remove_line_by_prefix("s=Asterisk");
Nothing happens.
Loaded sdpops.so module as well.
Is there any additional needed?
BR
Hi fellow kamailio users,
I'm playing actually with t_on_branch_failure, in a simultaneous forking
scenario ( lookup("location") returns multiple contacts ).
Any idea on how to get those "on_branch_failure" working ?
Thanks in Advance !
* Test by putting failure_exec_mode:
- at 1 => no branch failure being called, never.
- at 0 => t_relay does not fail if a single branch answers the
transaction, even if all other branches are failing.
* Test by moving the t_on_branch_failure("manage_branch_failure"); line
before or after the lookup("location") or on a _on_branch route to set
it per branch.
- The on_route branch are executed, but never the failure one.
- tried also with failure_exec_mode = 0 or 1.
* Using set_forward_no_connect, I can see in the logs a "Sending to
branch X failed" but no failure route being executed. Without it,
nothing in the logs indicating that the branch has timeout.
* Config extract:
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3) # 3 by default
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)
modparam("tm", "reparse_on_dns_failover", 0)
# 1: Allow branches to have a per branch failure route
# 0: t_relay should fail if a branch fail
modparam("tm", "failure_exec_mode", 1)
# Allow locally generated 408 to be forgotten in case a reply is received.
#modparam("tm", "faked_reply_prio", 2000)
# USER location service
route[LOCATION] {
t_on_branch_failure("manage_branch_failure");
if (!lookup("location")) {
....
}
# Let's get back after 2.5s if no 100/Trying received.
t_set_fr(0, 2500);
# set_forward_no_connect();
#t_on_branch("SET_BRANCH_FAILURE");
route(RELAY);
exit;
}
route[RELAY] {
....
if (!t_relay()) {
xlog("L_WARN","$rm|$ci|$fu|$tu|RELAY_FAILED");
sl_reply_error();
}
exit();
}
# set failure route per branch
branch_route[SET_BRANCH_FAILURE] {
xlog("L_WARN","$rm|$ci|$fu|$tu|SETTING_BrANCH_FAILURE_ROUTE");
t_on_branch_failure("manage_branch_failure");
}
# manage failure routing cases per branch
event_route[tm:branch-failure:manage_branch_failure] {
xlog("L_WARN","$rm|$ci|$fu|$tu[$avp(dest_to)]|MANAGE_BRANCH_FAILURE");
}
Hi all,
I am trying to use the unixODBC module to connect to MariaDB as a first step and then to test it to connect to MSSQL (please don't blame me on MSSQL...). I am using Kamailio 4.3.5 on CentOS7.2 fully patched. Here info about installed unixODBC:
[root@r5dev-KAM1 ~]# yum list installed | grep unix
unixODBC.x86_64 2.3.1-11.el7 @base
unixODBC-devel.x86_64 2.3.1-11.el7 @base
Which leads me to my possible problem that I can't start Kamailio with db_unixodbc.so because it is giving me this error:
r5dev-KAM1 /usr/local/kamailio/sbin/kamailio[16307]: ERROR: <core> [db.c:203]: db_bind_mod(): Module db_unixODBC not found. Missing loadmodule?
Followed by errors from modules depending on the DBURL are failing as well. Here my modules part:
...
#!define DBURL "unixODBC://root:<passw>@localhost/MARIADB"
...
# Module Path
mpath="/usr/local/kamailio/lib64/kamailio/modules/"
loadmodule "tls.so"
# ----- tls params -----
modparam("tls", "config", "/usr/local/kamailio/etc/kamailio/tls.cfg")
#loadmodule "db_mysql.so"
loadmodule "db_unixodbc.so"
...
I doublechecked that the module was compiled and is present:
[root@r5dev-KAM1 ~]# ls -ll /usr/local/kamailio/lib64/kamailio/modules/ | grep unix
-rwxr-xr-x. 1 root root 184451 28. Apr 08:56 db_unixodbc.so
I tried to check the db.c and db_unixodbc.c but I am not familiar with the c-syntax.
I somehow suspect that the error is related to Linux case sensitivity if db.c is trying to check if "unixODBC" is installed and then trying to match it with the "db_unixodbc.so" but I'm am not sure.
Can someone please give further advice?
Respectfully
Dimitry Nagorny
Trainee
Hello,
How i enable push notification in kamailio.How i proceed to configure the
kamailio configuration file and which kamailio module should i look for?
Thanks