Hello,
I am considering to release Kamailio v5.0.1 sometime next week, likely
on Wednesday, April 5, 2017. Should anyone be aware of issues not listed
yet on bug tracker, report them there as soon as possible to try to fix.
Soon after, we should release a new version from branch 4.4 and the last
one from branch 4.3.
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
I am using the avpops module to read from a mysql database to look for CFWD information for the call. When a call is placed, it appears the command avp_db_load attempts to read the file but all values come back as NULL. There are no messages in the log and of course the call does not process correctly.
We are using a config that is exactly the same on a 4.3.4 version of kamailio using cento 6.7, with a local version of mysql Ver 14.14 Distrib 5.1.73, that works perfectly. When moving the code to kamailio 4.4.4 on Debian 8, Jessie, mysql Ver 14.14 Distrib 5.5.53 the avp_db_load returns no information.
Here is the snippet of the code we are using. Since I am not used to troubleshooting kamailio, please let me know what other information you need.
Thanks,
Kevin
Code snippet:
#!ifdef WITH_CFWD
xlog ("$TF Call to $rU made it into WITH_CFWD in route[LOCATION] block\n");
# Call forwarding is enabled, so lets do a lookup to pull all AVP's for possible call forwarding types/destinations
# Below line should load all AVP's into memory from DB for the username portion of the TO: field from table usr_preferences
xlog("script should load from DB usr_preferences next");
avp_db_load("$tU","s/usr_preferences");
# This line i simple want to print to log when the avp load is complete and what the values are (for debug purposes only and should typically be commented out)
xlog("DB load should be complete");
xlog("SCRIPT: $TF Call Forwarding Unconditional set to $avp(Unconditional)\n");
xlog("SCRIPT: $TF Call Forwarding NoAnswer set to $avp(NoAnswer)\n");
xlog("SCRIPT: $TF Call Forwarding Busy set to $avp(Busy)\n");
avp_print();
# Check to see if the AVP's are set and if so put them in log for logging purposes
if(is_avp_set("$avp(Unconditional)"))
xlog("SCRIPT: $TF Call Forwarding Unconditional set to $avp(Unconditional)\n");
if(is_avp_set("$avp(NoAnswer)"))
xlog("SCRIPT: $TF Call Forwarding NoAnswer set to $avp(NoAnswer)\n");
if(is_avp_set("$avp(Busy)"))
xlog("SCRIPT: $TF Call Forwarding Busy set to $avp(Busy)\n");
t_set_fr(16000, 15000); # set fr invite timeout to 16s and no response at all to 15s to meet the specs for call fowarding no answer ringtime
# If Call fowarding Unconditional is set, we need to change the dialed number and sent it off to the original users trunk from subscriber table
# Check to see if unconditional is set
if(is_avp_set("$avp(Unconditional)"))
# Shove this call into route [PSTN_CFWD] Block
route("PSTN_CFWD");
Here is the syslog for the same snippet:
09:29 2017 Call to 15703771055 made it into WITH_CFWD in route[LOCATION] block
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: script should load from DB usr_preferences next
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: DB load should be complete
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT: Wed Mar 29 14:09:29 2017 Call Forwarding Unconditional set to <null>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT: Wed Mar 29 14:09:29 2017 Call Forwarding NoAnswer set to <null>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT: Wed Mar 29 14:09:29 2017 Call Forwarding Busy set to <null>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: INFO: avpops [avpops_impl.c:1473]: ops_print_avp(): p=0x7f440ed86f90, flags=0x0113
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: INFO: avpops [avpops_impl.c:1477]: ops_print_avp(): #011#011#011name=<direction>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: INFO: avpops [avpops_impl.c:1485]: ops_print_avp(): #011#011#011val_str=<INCOMING / 8>
Hey Guys,
Any of you know which module is adding the "i" attribute and maybe if it
can be removed safely? The reason would be for some Avaya PBXes
discarding the Via completely due to this attribute.
Sample header:
"""
Via: SIP/2.0/UDP
1.2.3.4;branch=z9hG4bKf0d6.72eca17f202d1e73a1f519dbecf7d6a6.0;i=8f1.
"""
Many thanks,
DanB
Hi,
A second update for people who started to look at this issue.
I have identified the real cause of the problem by looking more in the kamailio log with the debug traces. I discover that it is related to the load of the properties table in the htable.
I have the following entries in my mysql db :
+-------+----------------+---------------------------------------------------------+------------+----------+
| id | key_name | key_value | value_type | key_type |
+-------+----------------+---------------------------------------------------------+------------+----------+
| 0 | VERSION | 120104-1734 | 0 | 0 |
| 1 | mmm-retry | 408=Y;502=Y;503=Y | 0 | 0 |
| 2 | mgcf-retry | 408=Y;502=Y;503=Y | 0 | 0 |
| 3 | max-mmm-retry | 2 | 0 | 0 |
| 4 | max-mgcf-retry | 2 | 0 | 0 |
| 5 | target-uri | mgcf=10.10.10.10;mmm-legacy=20.20.20.10;mmm=20.20.20.20 | 0 | 0 |
| 6 | pike-status | 503 Service Overload | 0 | 0 |
| 7 | mgcf-path | 99 | 0 | 0 |
| 16 | mmm-nodeid | OPMMMS1VSE01=1;OPMMMS1VSE02=2 | 0 | 0 |
| 17 | mmm-node-path | 1=1;2=2 | 0 | 0 |
+-------+----------------+---------------------------------------------------------+------------+----------+
In the kamailio.cfg, the << modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;") >> command causes the load of the above table in the htable.
In the log we can see, that the load is done in the alphabetic order of the key_name and it fails to load the last entry "VERSION" :
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [VERSION]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [120104-1734]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
If I add a new entry named "WWWWW", then the failure occurs on this entry that is the last alphabetic entry :
| 10000 | WWWWW | toto | 0 | 0 |
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [WWWWW]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [toto]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
Attached the kamailio log for each test.
I hope this help.
Have anyone an idea of this problem ?
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick
Envoyé : mardi 21 mars 2017 09:41
À : Kamailio users (sr-users(a)lists.sip-router.org) <sr-users(a)lists.sip-router.org>
Objet : RE: ht_db_load_table(): key type must be string (type=6)
Hi,
There was a mistake in the file attached ; the short kamailio.cfg file (that makes kamailio to start) was not the correct one; attached the correct one.
Have anyone an idea of this problem ?
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick
Envoyé : lundi 20 mars 2017 17:58
À : Kamailio users (sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>) <sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>
Objet : RE: ht_db_load_table(): key type must be string (type=6)
Hi,
To figure out what causes this issue, I work to shorten my kamailio.cfg to contains loadmodule/modparam instructions for the htable module only.
My first attempt (see kamailio.cfg.ok) shows that the problem doesn't occur.
In the second attempt (see kamailio.cfg.ko) I add instructions previously removed from the original .cfg file. I have determined that, depending on the instructions that follows the "modparam("htable", "fetch_rows", 1000)" line, the "key type must be string (type=6)" error occurs or not.
In this ko file, if I comment out the following sequence, the error occurs :
modparam("htable", "fetch_rows", 1000)
#!!ifdef FIXED_ROUTING
#modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
#!!else
#modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
#modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
#!!endif
modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")
I hope my explanation is clearn and there are people who can help me on this problem that causes kamailio to not start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick
Envoyé : vendredi 17 mars 2017 15:46
À : Kamailio users (sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>) <sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>
Objet : ht_db_load_table(): key type must be string (type=6)
Hi,
Now the kamailio installation is completed, I try to start kamailio but got an error on a modparam line.
By looking at the kamailio.cfg (with debug mode) it looks like the instruction is not correct :
modparam("htable", "fetch_rows", 1000)
[root@vm-vse02-siprouter1 ~]# systemctl status kamailio.service -l
kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.
Loaded: loaded (/etc/rc.d/init.d/kamailio)
Active: failed (Result: exit-code) since Fri 2017-03-17 15:38:13 CET; 17s ago
Process: 1526 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: pike [pike.c:99]: pike_init(): PIKE - initializing
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: pike [ip_tree.c:81]: init_lock_set(): probing 256 set size
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: cfgutils [cfgutils.c:767]: mod_init(): no hash_file given, disable hash functionality
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: ERROR: <core> [core/sr_module.c:968]: init_mod(): Error while initializing module htable (/usr/lib64/kamailio/modules/htable.so)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Mar 17 15:38:13 vm-vse02-siprouter1 kamailio[1526]: Starting kamailio:
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: kamailio.service: control process exited, code=exited status=1
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: Unit kamailio.service entered failed state.
[root@vm-vse02-siprouter1 ~]#
modparam("htable", "fetch_rows", "1000")
[root@vm-vse02-siprouter1 ~]# systemctl status kamailio.service -l
kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.
Loaded: loaded (/etc/rc.d/init.d/kamailio)
Active: failed (Result: exit-code) since Fri 2017-03-17 15:26:21 CET; 3s ago
Process: 1452 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Mar 17 15:26:20 vm-vse02-siprouter1 systemd[1]: Starting SYSV: Kamailio is a fast, reliable and flexible SIP Server....
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: Not starting : invalid configuration file!
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) ERROR: <core> [core/modparam.c:141]: set_mod_param_regex(): parameter <fetch_rows> of type <1> not found in module <htable>
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) CRITICAL: <core> [core/cfg.y:3404]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 308, column 41: Can't set module parameter
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) WARNING: <core> [core/cfg.y:3378]: warn_at(): warning in config file //etc/kamailio/kamailio.cfg, line 971, column 6-13: constant value in if(...)
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: ERROR: bad config file (1 errors)
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: kamailio.service: control process exited, code=exited status=1
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: Unit kamailio.service entered failed state.
[root@vm-vse02-siprouter1 ~]#
The documentation shows that fetch_rows is an integer :
fetch_rows (integer)
How many rows to fetch at once from database.
Default value is 100.
Example 1.12. Set fetch_rows parameter
...
modparam("htable", "fetch_rows", 1000)
So how to explain the first error.
Have you any thoughts on this case ?
Cordialement
Patrick GINHOUX
Hi Juha,
I mean to say that all of the headers in a SIP message.
I need to replace all the headers with the headers received before and send to the client.
Thanks,
Narayan
________________________________
From: sr-users <sr-users-bounces(a)lists.sip-router.org> on behalf of sr-users-request(a)lists.sip-router.org <sr-users-request(a)lists.sip-router.org>
Sent: Tuesday, April 4, 2017 10:00:02 AM
To: sr-users(a)lists.sip-router.org
Subject: sr-users Digest, Vol 143, Issue 5
Send sr-users mailing list submissions to
sr-users(a)lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-request(a)lists.sip-router.org
You can reach the person managing the list at
sr-users-owner(a)lists.sip-router.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of sr-users digest..."
Today's Topics:
1. Re: Issue in replacing message header in kamailio (Narayan P)
2. Re: Issue in replacing message header in kamailio (Juha Heinanen)
----------------------------------------------------------------------
Message: 1
Date: Tue, 4 Apr 2017 09:02:28 +0000
From: Narayan P <narayana88(a)outlook.com>
To: "sr-users(a)lists.sip-router.org" <sr-users(a)lists.sip-router.org>
Subject: Re: [SR-Users] Issue in replacing message header in kamailio
Message-ID:
<HK2PR0201MB1745D10E07415A9696765176D70B0(a)HK2PR0201MB1745.apcprd02.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Can anybody help me on this.Any API to replace a message header completely in kamailio configuration file and its usage.
Thanks,
Narayan
________________________________
From: Narayan P
Sent: Tuesday, April 4, 2017 6:31:14 AM
To: sr-users(a)lists.sip-router.org
Subject: Re: Issue in replacing message header in kamailio
Hi All,
How to replace message header completely that has been received previously in another 200 OK response message.
I have used remove_body() and replace_body(re, txt) .
Is there any API to replace these.
Any suggestion will be highly appreciated.
Thanks,
Narayan
________________________________
From: Narayan P
Sent: Monday, April 3, 2017 1:41:47 PM
To: sr-users(a)lists.sip-router.org
Subject: Issue in replacing message header in kamailio
Hi All,
How to replace total message header in another 200 ok response message.
I have used remove_body() and replace_body(re, txt) .
Is there any API to replace these.
Any suggestion will be highly appreciated.
Thanks,
Narayan
Hi All,
How to replace total message header in another 200 ok response message.
I have used remove_body() and replace_body(re, txt) .
Is there any API to replace these.
Any suggestion will be highly appreciated.
Thanks,
Narayan
Hi list,
I am having some issues parsing multipart INVITE [1] when
calling force_rtp_proxy . I tried to upgrade to Kamailio 5 to see if maybe
i was using too old code but seems not the case.
Log of error is:
Apr 3 18:31:21 mcptt /usr/sbin/kamailio[3232]: INFO: <script>: forcing RTP
proxy for INVITE message
Apr 3 18:31:21 mcptt /usr/sbin/kamailio[3232]: ERROR: <core>
[core/parser/parse_content.c:370]: decode_mime_type():
ERROR:decode_mime_type: parse error near in
[application/vnd.3gpp.mcptt-info+xml] char[51][3] offset=16
So seems there is some issue using Content Type
application/vnd.3gpp.mcptt-info+xml in a multipart SIP message
But this content type is accepted at following 3GPP spec:
http://www.etsi.org/deliver/etsi_ts/129100_129199/129165/13.06.00_60/ts_129…
Checking implementation of parse_content.c I see ". - _ +" characters are
accepted so i am not sure what is failing.
I did some test and if instead of that Content-Type:
application/vnd.3gpp.mcptt-info+xml
i use Content-Type: application/mcptt no errors are seen in Kamailio
logs and ports are replaced succesfully.
So do you see something wrong on what i am doing with attached info?
INVITE sip:mcpttparticipating@demo.net SIP/2.0
Record-Route: <sip:10.1.1.123:6074;transport=tcp;lr=on;ftag=i3b01a;nat=yes>
Call-ID: db6b10362447354bc9819df9a9046ecb(a)10.1.1.222
CSeq: 1 INVITE
From: <sip:blue1@demo.net>;tag=i3b01a
To: <sip:ccw@demo.net;poc-group=blues>
Via: SIP/2.0/TCP 10.1.1.123:6074
;branch=z9hG4bK15a9.1c063dec40e772152f44c026a1627082.0;i=f
Via: SIP/2.0/TCP 10.1.1.222:5070
;received=10.1.1.222;rport=55173;branch=z9hG4bK-363135-1750dc6e97437e4788f446f2d818b60a
Max-Forwards: 69
Contact: <sip:blue1@10.1.1.222:55173
>;transport=tcp;+g.3gpp.mcptt;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";isfocus
Accept-Contact: *;+g.3gpp.mcptt;require;explicit
Accept-Contact:
*;+g.3gpp.icsi-ref="urn:urn-7:3gpp-service.ims.icsi.mcptt";require;explicit
P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mcptt
P-Preferred-Identity: <sip:blue1@demo.net>
User-Agent: PoC-client/3GPP-Rel13 DemoClient/v2.03.01/BV6000/SDK23
Session-Expires: 3600
Min-SE: 90
Supported: replaces, 100rel, timer, norefersub, timer, answermode, eventlist
Resource-Priority: mcpttp.5
Content-Type: multipart/mixed;boundary=gnkboundary
Content-Length: 997
--gnkboundary
Content-Type: application/sdp
v=0
o=- 3626700268 3626700268 IN IP4 10.1.1.222
s=spimedia
c=IN IP4 10.1.1.222
t=0 0
a=X-nat:0
m=audio 10002 RTP/AVP 106
a=rtcp:10003 IN IP4 10.1.1.222
i=speech
a=rtpmap:106 AMR-WB/16000
a=fmtp:106 mode-change-period=1; mode-change-capability=2;
mode-change-neighbor=0; max-red=0
a=sendrecv
a=ptime:100
a=maxptime:400
m=application 10003 udp MCPTT
a=fmtp:MCPTT mc_queueing;mc_priority=1
--gnkboundary
Content-Type: application/vnd.3gpp.mcptt-info+xml
<?xml version="1.0" encoding="UTF-8"?>
<mcpttinfo xmlns="urn:3gpp:ns:mcpttInfo:1.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<mcptt-Params>
<session-type>chat</session-type>
<mcptt-request-uri type="Normal">
<mcpttURI>sip:ccw@demo.net;poc-group=blues</mcpttURI>
</mcptt-request-uri>
<mcptt-client-id type="Normal">
<mcpttURI>urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF</mcpttURI>
</mcptt-client-id>
</mcptt-Params>
</mcpttinfo>
--gnkboundary--
Thanks!
Albert
Dear list,
I've recently upgraded to Kamailio 5 in order to avoid issue parsing SDP
multipart bodies which think are fixed in the update ( - symbol rejected in
content type) .
I could upgrade without issues from my kamailio 4 dev deployment but i
cannot load anymore MI_Datagram module (seems not present in Kamailio 5 ,
MI Datagram module i refer to:
http://www.kamailio.org/docs/modules/4.3.x/modules/mi_datagram.html )
Can i use MI Datagram module still in Kamailio 5 ?
Thanks
Albert