kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
October 2015
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
28 participants
236 discussions
Start a n
N
ew thread
[kamailio] kamailio-mysql-modules on Ubuntu 14.04 not installable (#376)
by Benjamin Tietz
Hi, I try to install kamailio-mysql-modules on Ubuntu 14.04 Trusty via latest repo: deb
http://deb.kamailio.org/kamailio
trusty main I want to use sipcapture for homer5 and need mysql 5.6 for that. Now the problem: Dependencies say I need mysql-client, which can't be installed because I have mysql-client-5.6 already installed but mysql-client points to mysql-client-5.5 This is mentioned as bug in:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1314555
https://wiki.debian.org/Teams/MySQL/virtual-mysql-server
Any options to change to virtual-mysql-client package as dependance for kamailio-mysql-modules? --- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/376
9 years
3
3
0
0
git:4.3:801d9cc9: dmq_usrloc: fixed handling of dmq_ul.get_urecord_by_ruid() response
by Daniel-Constantin Mierla
Module: kamailio Branch: 4.3 Commit: 801d9cc900a7cdd954733012540299c7ca288007 URL:
https://github.com/kamailio/kamailio/commit/801d9cc900a7cdd954733012540299c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-10-27T11:44:06+01:00 dmq_usrloc: fixed handling of dmq_ul.get_urecord_by_ruid() response - manual backport of master branch commits: 13cde2b and eeb3c16 (GH#373) --- Modified: modules/dmq_usrloc/usrloc_sync.c --- Diff:
https://github.com/kamailio/kamailio/commit/801d9cc900a7cdd954733012540299c…
Patch:
https://github.com/kamailio/kamailio/commit/801d9cc900a7cdd954733012540299c…
--- diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c index 40e89d3..c3c7e89 100644 --- a/modules/dmq_usrloc/usrloc_sync.c +++ b/modules/dmq_usrloc/usrloc_sync.c @@ -197,14 +197,14 @@ void usrloc_get_all_ucontact(dmq_node_t* node) memcpy( &aorhash, cp, sizeof(aorhash)); cp = (char*)cp + sizeof(aorhash); + r = 0; + ptr = 0; res = dmq_ul.get_urecord_by_ruid(_d, aorhash, &ruid, &r, &ptr); - aor = r->aor; - if (res > 0) { - LM_DBG("'%.*s' Not found in usrloc\n", aor.len, ZSW(aor.s)); - dmq_ul.release_urecord(r); - dmq_ul.unlock_udomain(_d, &aor); + if (res < 0) { + LM_DBG("'%.*s' Not found in usrloc\n", ruid.len, ZSW(ruid.s)); continue; } + aor = r->aor; LM_DBG("- AoR: %.*s AoRhash=%d Flags=%d\n", aor.len, aor.s, aorhash, flags); while (ptr) {
9 years
1
0
0
0
[kamailio] kamailio 4.3.3 crash during usrloc save location and DMQ (#373)
by vinzens
We use the kamailio with dmq. One Kamailio gets an SIP Register and process it and forwards it though DMQ to another kamailio. here it should be saved in location as well. During saving this location the kamailio crashes. For me (not an dev) it seems to crash during getting the length of the AOR. This is not happening every time while kamailio gets an DMQ register but we can reproduce it very easy. (at least this is the line pointing to referred in the backtrace) the SIP DMQ Message looks like Oct 20 14:44:53 messi /usr/sbin/kamailio[15059]: NOTICE: <script>: Got KDMQ Message, handle it.. KDMQ sip:usrloc@217.116.120.39:5060 SIP/2.0 Via: SIP/2.0/UDP 172.20.21.3;branch=z9hG4bK7031.da526d01000000000000000000000000.0 To: <sip:usrloc@217.116.120.39:5060> From: <sip:usrloc@172.20.21.3:5060>;tag=c67e1a50505355c50500c05660eca619-6820 CSeq: 10 KDMQ Call-ID: 77bf92d7284e3548-25608(a)172.20.21.3 Content-Length: 430 Max-Forwards: 0 Content-Type: application/json {"action":2,"aor":"1016811e7(a)sipgate.de","ruid":"uloc-562103eb-6411-a4a1","c":"sip:1016811e7@XX.XXX.XXX.XX:3072;line=2u4rbxb1","received":"","path":"<sip:XXX.XXX.XXX.XXX;lr>","callid":"3134343130393735323137323138-pbswhv8xostq","user_agent":"snom870/8.7.5.13","instance":"<urn:uuid:f3495943-cd1f-4de0-8d9c-000413413E79>","expires":10,"cseq":28786,"flags":0,"cflags":0,"q":1000,"last_modified":1445345060,"methods":6111,"reg_id":1} we managed to get an core dump and it says: GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html
> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <
http://www.gnu.org/software/gdb/bugs/
>... Reading symbols from /usr/sbin/kamailio...Reading symbols from /usr/lib/debug/.build-id/b9/e50c34b5b5de6da1e2473514911ce96a8a094d.debug...done. done. [New LWP 15069] warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio_sip_location_proxy.cfg -P /var/run'. Program terminated with signal 11, Segmentation fault. #0 0x00007f573d8c7770 in db_load_urecord_by_ruid (_c=0x7f573f616278, _d=_d@entry=0x7f5736ef5498, _ruid=_ruid@entry=0x7f573ae6d200) at udomain.c:822 822 udomain.c: No such file or directory. (gdb) bt #0 0x00007f573d8c7770 in db_load_urecord_by_ruid (_c=0x7f573f616278, _d=_d@entry=0x7f5736ef5498, _ruid=_ruid@entry=0x7f573ae6d200) at udomain.c:822 #1 0x00007f573d8cd0d5 in get_urecord_by_ruid (_d=0x7f5736ef5498, _aorhash=2416148423, _ruid=_ruid@entry=0x7f573ae6d200, _r=_r@entry=0x7ffc358958a0, _c=_c@entry=0x7ffc358958b0) at udomain.c:1177 #2 0x00007f573ac6720a in delete_contact (aor=..., ci=<optimized out>) at usrloc_sync.c:109 #3 usrloc_dmq_handle_msg (msg=<optimized out>, resp=0x7ffc35895a00, node=0x7f5736f9e6d8) at usrloc_sync.c:394 #4 0x00007f573ae8b10b in worker_loop (id=id@entry=1) at worker.c:105 #5 0x00007f573ae721e8 in child_init (rank=<optimized out>) at dmq.c:293 #6 child_init (rank=<optimized out>) at dmq.c:279 #7 0x000000000056d4f8 in init_mod_child (m=0x7f573f5fdf20, rank=rank@entry=0) at sr_module.c:915 #8 0x000000000056d442 in init_mod_child (m=0x7f573f5fe418, rank=rank@entry=0) at sr_module.c:912 #9 0x000000000056e91b in init_child (rank=rank@entry=0) at sr_module.c:941 #10 0x00000000004aa78c in main_loop () at main.c:1650 #11 0x0000000000427292 in main (argc=<optimized out>, argv=<optimized out>) at main.c:2547 (gdb) bt full #0 0x00007f573d8c7770 in db_load_urecord_by_ruid (_c=0x7f573f616278, _d=_d@entry=0x7f5736ef5498, _ruid=_ruid@entry=0x7f573ae6d200) at udomain.c:822 ci = 0x7f573daeaf00 columns = {0x7f573daeac30, 0x7f573daeac20, 0x7f573daeac10, 0x7f573daeac00, 0x7f573daeabf0, 0x7f573daeabe0, 0x7f573daeabd0, 0x7f573daeabc0, 0x7f573daeabb0, 0x7f573daeaba0, 0x7f573daeab90, 0x7f573daeab80, 0x7f573daeab50, 0x7f573daeac60, 0x7f573daeab70, 0x7f573daeab60, 0x7f573daeab40, 0x7f573daeab30, 0x7f573daeab20, 0x7f573daeac50, 0x7f573daeac40} keys = {0x7f573daeac60} order = <optimized out> vals = {{type = DB1_STR, nul = 0, free = 2, val = {int_val = 40974704, ll_val = 40974704, double_val = 2.0244193594913908e-316, time_val = 40974704, string_val = 0x2713970 "uloc-562103eb-6411-a4a1", str_val = {s = 0x2713970 "uloc-562103eb-6411-a4a1", len = 23}, blob_val = {s = 0x2713970 "uloc-562103eb-6411-a4a1", len = 23}, bitmap_val = 40974704}}} res = 0x7f573f6164e8 row = <optimized out> contact = {s = 0x272edd0 "sip:1016811e7@XX.XXX.XXX.XX:3072;line=e52c50xi", len = 46} aor = {s = 0x37fc50 <Address 0x37fc50 out of bounds>, len = 898193808} aorbuf = '\000' <repeats 511 times> domain = <optimized out> r = 0x0 c = <optimized out> __FUNCTION__ = "db_load_urecord_by_ruid" #1 0x00007f573d8cd0d5 in get_urecord_by_ruid (_d=0x7f5736ef5498, _aorhash=2416148423, _ruid=_ruid@entry=0x7f573ae6d200, _r=_r@entry=0x7ffc358958a0, _c=_c@entry=0x7ffc358958b0) at udomain.c:1177 sl = 16327 i = <optimized out> r = <optimized out> c = <optimized out> #2 0x00007f573ac6720a in delete_contact (aor=..., ci=<optimized out>) at usrloc_sync.c:109 c = <optimized out> ci = 0x7f573ae6d200 _d = 0x7f5736ef5498 r = <optimized out> #3 usrloc_dmq_handle_msg (msg=<optimized out>, resp=0x7ffc35895a00, node=0x7f5736f9e6d8) at usrloc_sync.c:394 content_length = <optimized out> body = <optimized out> jdoc = {root = 0x27137b0, flags = 0, buf = { s = 0x7f5736fd6662 "{\"action\":2,\"aor\":\"1016811e7(a)sipgate.de\",\"ruid\":\"uloc-562103eb-6411-a4a1\",\"c\":\"sip:1016811e7@XX.XXX.XXX.XX:3072;line=2u4rbxb1\",\"received\":\"\",\"path\":\"<sip:217.116.120.247;lr>\",\"callid\":\"313434313039373"..., len = 438}, malloc_fn = 0x7f573fa1ba00 <malloc>, free_fn = 0x7f573fa1b920 <free>} it = <optimized out> ci = {ruid = {s = 0x2713970 "uloc-562103eb-6411-a4a1", len = 23}, c = 0x7ffc358958d0, received = {s = 0x2719190 "", len = 0}, path = 0x7ffc358958e0, expires = 1445345660, q = 1000, callid = 0x7ffc358958f0, cseq = 28786, flags = 2, cflags = 0, user_agent = 0x7ffc35895900, sock = 0x0, methods = 6111, instance = { s = 0x27193d0 "<urn:uuid:f3495943-cd1f-4de0-8d9c-000413413E79>", len = 47}, reg_id = 1, server_id = 0, tcpconn_id = -1, keepalive = 0, xavp = 0x0, last_modified = 1445345060} action = <optimized out> expires = <optimized out> cseq = <optimized out> flags = <optimized out> cflags = <optimized out> q = <optimized out> last_modified = <optimized out> methods = <optimized out> reg_id = <optimized out> aor = {s = <optimized out>, len = 20} ruid = <optimized out> c = {s = 0x27190e0 "sip:1016811e7@IPADDRESS:3072;line=2u4rbxb1", len = 46} received = <optimized out> path = {s = 0x2713a00 "<sip:IPADDRESS;lr>", len = 24} callid = {s = 0x2719290 "3134343130393735323137323138-pbswhv8xostq", len = 41} user_agent = {s = 0x2719340 "snom870/8.7.5.13", len = 16} instance = <optimized out> __FUNCTION__ = "usrloc_dmq_handle_msg" #4 0x00007f573ae8b10b in worker_loop (id=id@entry=1) at worker.c:105 worker = 0x7f5736f957f0 current_job = 0x7f5736fa0a00 peer_response = {resp_code = 0, content_type = {s = 0x0, len = 0}, reason = {s = 0x0, len = 0}, body = {s = 0x0, len = 0}} ret_value = <optimized out> not_parsed = 0 dmq_node = 0x7f5736f9e6d8 __FUNCTION__ = "worker_loop" #5 0x00007f573ae721e8 in child_init (rank=<optimized out>) at dmq.c:293 ---Type <return> to continue, or q <return> to quit--- i = <optimized out> newpid = <optimized out> #6 child_init (rank=<optimized out>) at dmq.c:279 No locals. #7 0x000000000056d4f8 in init_mod_child (m=0x7f573f5fdf20, rank=rank@entry=0) at sr_module.c:915 __FUNCTION__ = "init_mod_child" #8 0x000000000056d442 in init_mod_child (m=0x7f573f5fe418, rank=rank@entry=0) at sr_module.c:912 __FUNCTION__ = "init_mod_child" #9 0x000000000056e91b in init_child (rank=rank@entry=0) at sr_module.c:941 No locals. #10 0x00000000004aa78c in main_loop () at main.c:1650 i = <optimized out> pid = <optimized out> si = <optimized out> si_desc = "udp receiver child=3 sock=217.116.120.39:5060\000\000\000\020\213k\000\000\000\000\000\252\311k\000\000\000\000\000\003\000\000\000\000\000\000\000(E\311\066W\177\000\000\001\000\000\000\000\000\000\000\000P:\251\313M\a\342\004\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\250\222\241\000\000\000\000\000\240\222\241\000\000\000\000" nrprocs = <optimized out> __FUNCTION__ = "main_loop" #11 0x0000000000427292 in main (argc=<optimized out>, argv=<optimized out>) at main.c:2547 cfg_stream = <optimized out> c = <optimized out> r = <optimized out> tmp = 0x7ffc35896efe "" tmp_len = 0 port = 1 proto = 1 options = 0x6baf50 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:" ret = -1 seed = 1198920520 rfd = 4 debug_save = <optimized out> debug_flag = <optimized out> dont_fork_cnt = <optimized out> n_lst = 0x0 p = <optimized out> st = {st_dev = 14, st_ino = 30859, st_nlink = 2, st_mode = 16877, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 60, st_blksize = 4096, st_blocks = 0, st_atim = { tv_sec = 1444903317, tv_nsec = 438957686}, st_mtim = {tv_sec = 1445345013, tv_nsec = 829833044}, st_ctim = {tv_sec = 1445345020, tv_nsec = 417829857}, __unused = {0, 0, 0}} __FUNCTION__ = "main" (gdb) --- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/373
9 years
3
16
0
0
git:master:fc0e6275: tm: added braces around initializer of cancel reason map
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: fc0e6275fa61f72c1fed0f69393f609cc682888c URL:
https://github.com/kamailio/kamailio/commit/fc0e6275fa61f72c1fed0f69393f609…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-10-27T11:26:23+01:00 tm: added braces around initializer of cancel reason map - reported by Yacin Caner --- Modified: modules/tm/t_cancel.c --- Diff:
https://github.com/kamailio/kamailio/commit/fc0e6275fa61f72c1fed0f69393f609…
Patch:
https://github.com/kamailio/kamailio/commit/fc0e6275fa61f72c1fed0f69393f609…
--- diff --git a/modules/tm/t_cancel.c b/modules/tm/t_cancel.c index ce18354..9db7abe 100644 --- a/modules/tm/t_cancel.c +++ b/modules/tm/t_cancel.c @@ -43,8 +43,8 @@ typedef struct cancel_reason_map { } cancel_reason_map_t; static cancel_reason_map_t _cancel_reason_map[] = { - 200, str_init("Answered elsewhere"), - 0, {0, 0} + { 200, str_init("Answered elsewhere") }, + { 0, {0, 0} } }; /**
9 years
1
0
0
0
git:master:eeb3c160: dmq_usrloc: access usrloc result record after handling return code
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: eeb3c160ecddd65aa76997ed98e9b1be8e08ab20 URL:
https://github.com/kamailio/kamailio/commit/eeb3c160ecddd65aa76997ed98e9b1b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-10-26T21:47:46+01:00 dmq_usrloc: access usrloc result record after handling return code - reported in GH#373 --- Modified: modules/dmq_usrloc/usrloc_sync.c --- Diff:
https://github.com/kamailio/kamailio/commit/eeb3c160ecddd65aa76997ed98e9b1b…
Patch:
https://github.com/kamailio/kamailio/commit/eeb3c160ecddd65aa76997ed98e9b1b…
--- diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c index 4d53d0c..2246c36 100644 --- a/modules/dmq_usrloc/usrloc_sync.c +++ b/modules/dmq_usrloc/usrloc_sync.c @@ -200,11 +200,11 @@ void usrloc_get_all_ucontact(dmq_node_t* node) r = 0; ptr = 0; res = dmq_ul.get_urecord_by_ruid(_d, aorhash, &ruid, &r, &ptr); - aor = r->aor; if (res < 0) { - LM_DBG("'%.*s' Not found in usrloc\n", aor.len, ZSW(aor.s)); + LM_DBG("'%.*s' Not found in usrloc\n", ruid.len, ZSW(ruid.s)); continue; } + aor = r->aor; LM_DBG("- AoR: %.*s AoRhash=%d Flags=%d\n", aor.len, aor.s, aorhash, flags); while (ptr) {
9 years
1
0
0
0
git:master:4505878d: acc_radius : added doc for rad_time_mode
by Yasin CANER
Module: kamailio Branch: master Commit: 4505878d8be26e2e5497cbba581a2a912a824912 URL:
https://github.com/kamailio/kamailio/commit/4505878d8be26e2e5497cbba581a2a9…
Author: Yasin CANER <yasin.caner(a)netgsm.com.tr> Committer: Yasin CANER <yasin.caner(a)netgsm.com.tr> Date: 2015-10-26T16:16:12+02:00 acc_radius : added doc for rad_time_mode added information about new mod paramaeter rad_time_mode --- Modified: modules/acc_radius/doc/acc_radius_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/4505878d8be26e2e5497cbba581a2a9…
Patch:
https://github.com/kamailio/kamailio/commit/4505878d8be26e2e5497cbba581a2a9…
--- diff --git a/modules/acc_radius/doc/acc_radius_admin.xml b/modules/acc_radius/doc/acc_radius_admin.xml index 17ebd2c..f439457 100644 --- a/modules/acc_radius/doc/acc_radius_admin.xml +++ b/modules/acc_radius/doc/acc_radius_admin.xml @@ -166,6 +166,39 @@ modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)") </programlisting> </example> </section> + <section> + <title><varname>rad_time_mode</varname>(integer)</title> + <para> + Radius Event-Timestamp for accounting. + </para> + <para> + Values can be: + </para> + <itemizedlist> + <listitem> + <para><emphasis>0</emphasis> - (default), format is only unix + timestamp for Event-Timestamp (For example: 1445590624)</para> + </listitem> + <listitem> + <para><emphasis>1</emphasis> - format is unix timestamp with microseconds + in Addition, it needs to change Event-Timestamp attribute type in dictionary to string + both radius server and client + (For example: 1445590624.377372) </para> + </listitem> + </itemizedlist> + + <para> + Default value is 0 (Unix timestamp). + </para> + <example> + <title>rad_time_mode example</title> + <programlisting format="linespecific"> +... +modparam("acc_radius", "rad_time_mode", 1) +... +</programlisting> + </example> +</section> </section> <section>
9 years
1
0
0
0
git:master:13999782: Merge pull request #378 from ycaner06/patch-7
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 139997826c8c3205504a0c799d7aa98b979e1185 URL:
https://github.com/kamailio/kamailio/commit/139997826c8c3205504a0c799d7aa98…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-10-26T21:38:52+01:00 Merge pull request #378 from ycaner06/patch-7 acc_radius : added radius time mode --- Modified: modules/acc_radius/acc_radius_mod.c Modified: modules/acc_radius/doc/acc_radius_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/139997826c8c3205504a0c799d7aa98…
Patch:
https://github.com/kamailio/kamailio/commit/139997826c8c3205504a0c799d7aa98…
--- diff --git a/modules/acc_radius/acc_radius_mod.c b/modules/acc_radius/acc_radius_mod.c index 5a660d6..3820339 100644 --- a/modules/acc_radius/acc_radius_mod.c +++ b/modules/acc_radius/acc_radius_mod.c @@ -74,6 +74,7 @@ static char *radius_config = 0; int radius_flag = -1; int radius_missed_flag = -1; static int service_type = -1; +int rad_time_mode=0; void *rh; /* rad extra variables */ static char *rad_extra_str = 0; @@ -91,11 +92,12 @@ static cmd_export_t cmds[] = { static param_export_t params[] = { - {"radius_config", PARAM_STRING, &radius_config }, + {"radius_config", PARAM_STRING, &radius_config }, {"radius_flag", INT_PARAM, &radius_flag }, {"radius_missed_flag", INT_PARAM, &radius_missed_flag }, {"service_type", INT_PARAM, &service_type }, - {"radius_extra", PARAM_STRING, &rad_extra_str }, + {"radius_extra", PARAM_STRING, &rad_extra_str }, + {"rad_time_mode", INT_PARAM, &rad_time_mode }, {0,0,0} }; @@ -328,6 +330,8 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf) int m=0; int o=0; int rc_result=-1; + double tsecmicro; + char smicrosec[18]; send=NULL; @@ -347,9 +351,18 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf) av_type = req->REQ_METHOD; /* method */ ADD_RAD_AVPAIR( RA_SIP_METHOD, &av_type, -1); - /* unix time */ - av_type = (uint32_t)inf->env->ts; - ADD_RAD_AVPAIR( RA_TIME_STAMP, &av_type, -1); + // Event Time Stamp with Microseconds + if(rad_time_mode==1){ + gettimeofday(&inf->env->tv, NULL); + tsecmicro=inf->env->tv.tv_sec+((double)inf->env->tv.tv_usec/1000000.0); + //radius client doesn t support double so convert it + sprintf(smicrosec,"%17.6f",tsecmicro); + ADD_RAD_AVPAIR(RA_TIME_STAMP, &smicrosec, -1); + }else{ + av_type = (uint32_t)inf->env->ts; + ADD_RAD_AVPAIR(RA_TIME_STAMP, &av_type, -1); + } + /* add extra also */ o = accb.get_extra_attrs(rad_extra, req, inf->varr+attr_cnt, diff --git a/modules/acc_radius/doc/acc_radius_admin.xml b/modules/acc_radius/doc/acc_radius_admin.xml index 17ebd2c..f439457 100644 --- a/modules/acc_radius/doc/acc_radius_admin.xml +++ b/modules/acc_radius/doc/acc_radius_admin.xml @@ -166,6 +166,39 @@ modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)") </programlisting> </example> </section> + <section> + <title><varname>rad_time_mode</varname>(integer)</title> + <para> + Radius Event-Timestamp for accounting. + </para> + <para> + Values can be: + </para> + <itemizedlist> + <listitem> + <para><emphasis>0</emphasis> - (default), format is only unix + timestamp for Event-Timestamp (For example: 1445590624)</para> + </listitem> + <listitem> + <para><emphasis>1</emphasis> - format is unix timestamp with microseconds + in Addition, it needs to change Event-Timestamp attribute type in dictionary to string + both radius server and client + (For example: 1445590624.377372) </para> + </listitem> + </itemizedlist> + + <para> + Default value is 0 (Unix timestamp). + </para> + <example> + <title>rad_time_mode example</title> + <programlisting format="linespecific"> +... +modparam("acc_radius", "rad_time_mode", 1) +... +</programlisting> + </example> +</section> </section> <section>
9 years
1
0
0
0
git:master:7d2e763b: acc_radius : fixed representation
by Yasin CANER
Module: kamailio Branch: master Commit: 7d2e763b2859ef614040c7b28c3aceb132eb95d3 URL:
https://github.com/kamailio/kamailio/commit/7d2e763b2859ef614040c7b28c3aceb…
Author: Yasin CANER <yasin.caner(a)netgsm.com.tr> Committer: Yasin CANER <yasin.caner(a)netgsm.com.tr> Date: 2015-10-26T15:49:24+02:00 acc_radius : fixed representation fixed exponential representation in converting --- Modified: modules/acc_radius/acc_radius_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/7d2e763b2859ef614040c7b28c3aceb…
Patch:
https://github.com/kamailio/kamailio/commit/7d2e763b2859ef614040c7b28c3aceb…
--- diff --git a/modules/acc_radius/acc_radius_mod.c b/modules/acc_radius/acc_radius_mod.c index e3be7df..3820339 100644 --- a/modules/acc_radius/acc_radius_mod.c +++ b/modules/acc_radius/acc_radius_mod.c @@ -356,7 +356,7 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf) gettimeofday(&inf->env->tv, NULL); tsecmicro=inf->env->tv.tv_sec+((double)inf->env->tv.tv_usec/1000000.0); //radius client doesn t support double so convert it - sprintf(smicrosec,"%f",tsecmicro); + sprintf(smicrosec,"%17.6f",tsecmicro); ADD_RAD_AVPAIR(RA_TIME_STAMP, &smicrosec, -1); }else{ av_type = (uint32_t)inf->env->ts;
9 years
1
0
0
0
git:master:750248ca: acc_radius : added radius time mode
by Yasin CANER
Module: kamailio Branch: master Commit: 750248ca22f0b8f03373cae2a56d56c3e0ae6d81 URL:
https://github.com/kamailio/kamailio/commit/750248ca22f0b8f03373cae2a56d56c…
Author: Yasin CANER <yasin.caner(a)netgsm.com.tr> Committer: Yasin CANER <yasin.caner(a)netgsm.com.tr> Date: 2015-10-23T11:12:43+03:00 acc_radius : added radius time mode added radius time mode for new event-timestamp . Format is seconds.microseconds --- Modified: modules/acc_radius/acc_radius_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/750248ca22f0b8f03373cae2a56d56c…
Patch:
https://github.com/kamailio/kamailio/commit/750248ca22f0b8f03373cae2a56d56c…
--- diff --git a/modules/acc_radius/acc_radius_mod.c b/modules/acc_radius/acc_radius_mod.c index 5a660d6..e3be7df 100644 --- a/modules/acc_radius/acc_radius_mod.c +++ b/modules/acc_radius/acc_radius_mod.c @@ -74,6 +74,7 @@ static char *radius_config = 0; int radius_flag = -1; int radius_missed_flag = -1; static int service_type = -1; +int rad_time_mode=0; void *rh; /* rad extra variables */ static char *rad_extra_str = 0; @@ -91,11 +92,12 @@ static cmd_export_t cmds[] = { static param_export_t params[] = { - {"radius_config", PARAM_STRING, &radius_config }, + {"radius_config", PARAM_STRING, &radius_config }, {"radius_flag", INT_PARAM, &radius_flag }, {"radius_missed_flag", INT_PARAM, &radius_missed_flag }, {"service_type", INT_PARAM, &service_type }, - {"radius_extra", PARAM_STRING, &rad_extra_str }, + {"radius_extra", PARAM_STRING, &rad_extra_str }, + {"rad_time_mode", INT_PARAM, &rad_time_mode }, {0,0,0} }; @@ -328,6 +330,8 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf) int m=0; int o=0; int rc_result=-1; + double tsecmicro; + char smicrosec[18]; send=NULL; @@ -347,9 +351,18 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf) av_type = req->REQ_METHOD; /* method */ ADD_RAD_AVPAIR( RA_SIP_METHOD, &av_type, -1); - /* unix time */ - av_type = (uint32_t)inf->env->ts; - ADD_RAD_AVPAIR( RA_TIME_STAMP, &av_type, -1); + // Event Time Stamp with Microseconds + if(rad_time_mode==1){ + gettimeofday(&inf->env->tv, NULL); + tsecmicro=inf->env->tv.tv_sec+((double)inf->env->tv.tv_usec/1000000.0); + //radius client doesn t support double so convert it + sprintf(smicrosec,"%f",tsecmicro); + ADD_RAD_AVPAIR(RA_TIME_STAMP, &smicrosec, -1); + }else{ + av_type = (uint32_t)inf->env->ts; + ADD_RAD_AVPAIR(RA_TIME_STAMP, &av_type, -1); + } + /* add extra also */ o = accb.get_extra_attrs(rad_extra, req, inf->varr+attr_cnt,
9 years
1
0
0
0
[kamailio] acc_radius : added radius time mode (#378)
by Yasin CANER
added radius time mode for new event-timestamp . Format is seconds.microseconds You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/378
-- Commit Summary -- * acc_radius : added radius time mode -- File Changes -- M modules/acc_radius/acc_radius_mod.c (23) -- Patch Links --
https://github.com/kamailio/kamailio/pull/378.patch
https://github.com/kamailio/kamailio/pull/378.diff
--- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/378
9 years
2
8
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
24
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Results per page:
10
25
50
100
200