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
January 2016
----- 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
34 participants
295 discussions
Start a n
N
ew thread
git:master:9c3ce397: ims_charging: Add ability, to retrieve the Diameter-Status-Code for the Charging-Session
by Carsten Bock
Module: kamailio Branch: master Commit: 9c3ce397a1baa45a7ee0123ff4e32bcf412506de URL:
https://github.com/kamailio/kamailio/commit/9c3ce397a1baa45a7ee0123ff4e32bc…
Author: Carsten Bock <carsten(a)ng-voice.com> Committer: Carsten Bock <carsten(a)ng-voice.com> Date: 2016-01-26T18:22:36+01:00 ims_charging: Add ability, to retrieve the Diameter-Status-Code for the Charging-Session --- Modified: modules/ims_charging/ims_ro.c Modified: modules/ims_charging/mod.h --- Diff:
https://github.com/kamailio/kamailio/commit/9c3ce397a1baa45a7ee0123ff4e32bc…
Patch:
https://github.com/kamailio/kamailio/commit/9c3ce397a1baa45a7ee0123ff4e32bc…
--- diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c index 73be360..ef27513 100644 --- a/modules/ims_charging/ims_ro.c +++ b/modules/ims_charging/ims_ro.c @@ -1428,6 +1428,29 @@ static int create_cca_return_code(int result) { return 1; } +static int create_cca_result_code(int result) { + int rc; + int_str avp_val, avp_name; + avp_name.s.s = RO_AVP_CCA_RESULT_CODE; + avp_name.s.len = RO_AVP_CCA_RESULT_CODE_LENGTH; + + avp_val.n = result; + avp_val.s.s = RO_RETURN_TRUE_STR; //assume true + avp_val.s.len = 1; + + rc = add_avp(AVP_NAME_STR | AVP_VAL_STR, avp_name, avp_val); + + if (rc < 0) + LM_ERR("Couldn't create ["RO_AVP_CCA_RESULT_CODE"] AVP\n"); + else + LM_DBG("Created AVP ["RO_AVP_CCA_RESULT_CODE"] successfully: value=[%d]\n", result); + + return 1; +} + + + + static int get_mac_avp_value(struct sip_msg *msg, str *value) { str mac_avp_name_str = str_init(RO_MAC_AVP_NAME); pv_spec_t avp_spec; diff --git a/modules/ims_charging/mod.h b/modules/ims_charging/mod.h index a34c5a9..bb52f5e 100644 --- a/modules/ims_charging/mod.h +++ b/modules/ims_charging/mod.h @@ -45,6 +45,9 @@ #define RO_AVP_CCA_RETURN_CODE "cca_return_code" #define RO_AVP_CCA_RETURN_CODE_LENGTH 15 +#define RO_AVP_CCA_RESULT_CODE "cca_result_code" +#define RO_AVP_CCA_RESULT_CODE_LENGTH 15 + #define RO_MAC_AVP_NAME "$avp(ro_mac_value)" #define DB_DEFAULT_UPDATE_PERIOD 60
8 years, 10 months
1
0
0
0
[kamailio] core: secondary timer interval (#487)
by Dmitri Savolainen
fix wrong function invocation period for secondary timer. i have noticed new secondary timer invocation period error , while looking at commit 93b5d2e functions called more often than it should due to (c % wt->cycles==0) is TRUE. i'm not sure this is the best possible fix, but it works You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/487
-- Commit Summary -- * core: secondary timer interval -- File Changes -- M timer_proc.c (6) -- Patch Links --
https://github.com/kamailio/kamailio/pull/487.patch
https://github.com/kamailio/kamailio/pull/487.diff
--- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/487
8 years, 10 months
2
3
0
0
git:master:0e8a67b8: core: secondary timer implemented as classic wheel timer (wtimer)
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 0e8a67b83a3ccb1113107402d9dda11b9829eaaa URL:
https://github.com/kamailio/kamailio/commit/0e8a67b83a3ccb1113107402d9dda11…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-01-26T00:35:57+01:00 core: secondary timer implemented as classic wheel timer (wtimer) --- Modified: timer_proc.c --- Diff:
https://github.com/kamailio/kamailio/commit/0e8a67b83a3ccb1113107402d9dda11…
Patch:
https://github.com/kamailio/kamailio/commit/0e8a67b83a3ccb1113107402d9dda11…
--- diff --git a/timer_proc.c b/timer_proc.c index ba87e7e..975c1fb 100644 --- a/timer_proc.c +++ b/timer_proc.c @@ -284,8 +284,9 @@ int fork_sync_utimer(int child_id, char* desc, int make_sock, typedef struct sr_wtimer_node { struct sr_wtimer_node *next; uint32_t interval; /* frequency of execution (secs) */ - uint32_t steps; /* interval = loops * SR_WTIMER_SIZE + steps */ + uint32_t steps; /* init: interval = loops * SR_WTIMER_SIZE + steps */ uint32_t loops; + uint32_t eloop; timer_function* f; void* param; } sr_wtimer_node_t; @@ -337,6 +338,7 @@ int sr_wtimer_add(timer_function* f, void* param, int interval) wt->interval = interval; wt->steps = interval % SR_WTIMER_SIZE; wt->loops = interval / SR_WTIMER_SIZE; + wt->eloop = wt->loops; wt->next = _sr_wtimer->wlist[wt->steps]; _sr_wtimer->wlist[wt->steps] = wt; @@ -346,11 +348,28 @@ int sr_wtimer_add(timer_function* f, void* param, int interval) /** * */ +int sr_wtimer_reinsert(uint32_t cs, sr_wtimer_node_t *wt) +{ + uint32_t ts; + + ts = (cs + wt->interval) % SR_WTIMER_SIZE; + wt->eloop = wt->interval / SR_WTIMER_SIZE; + wt->next = _sr_wtimer->wlist[ts]; + _sr_wtimer->wlist[ts] = wt; + + return 0; +} + +/** + * + */ void sr_wtimer_exec(unsigned int ticks, void *param) { sr_wtimer_node_t *wt; - uint32_t i; - uint32_t c; + sr_wtimer_node_t *wn; + sr_wtimer_node_t *wp; + uint32_t cs; + uint32_t cl; if(_sr_wtimer==NULL) { LM_ERR("wtimer not intialized\n"); @@ -358,17 +377,29 @@ void sr_wtimer_exec(unsigned int ticks, void *param) } _sr_wtimer->itimer++; - c = _sr_wtimer->itimer / SR_WTIMER_SIZE; - - for(i=1; i<=SR_WTIMER_SIZE; i++) { - if(_sr_wtimer->itimer % i == 0) { - for(wt=_sr_wtimer->wlist[i % SR_WTIMER_SIZE]; - wt!=NULL; wt = wt->next) { - if(wt->loops==0 || (c % wt->loops==0)) { - wt->f(ticks, wt->param); - } + cs = _sr_wtimer->itimer % SR_WTIMER_SIZE; + cl = _sr_wtimer->itimer / SR_WTIMER_SIZE; + LM_DBG("wtimer - loop: %u - slot: %u\n", cl, cs); + + wp = NULL; + wt=_sr_wtimer->wlist[cs]; + while(wt) { + wn = wt->next; + if(wt->eloop==0) { + /* execute timer callback function */ + wt->f(ticks, wt->param); + /* extract and reinsert timer item */ + if(wp==NULL) { + _sr_wtimer->wlist[cs] = wn; + } else { + wp->next = wn; } + sr_wtimer_reinsert(cs, wt); + } else { + wt->eloop--; + wp = wt; } + wt = wn; } }
8 years, 10 months
1
0
0
0
git:master:f0313ae9: core: renamed cycles to loops to reflect rotation of the wheel timer
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f0313ae9edcaa2db39d265377e2f80344ced6dd5 URL:
https://github.com/kamailio/kamailio/commit/f0313ae9edcaa2db39d265377e2f803…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-01-25T23:37:49+01:00 core: renamed cycles to loops to reflect rotation of the wheel timer --- Modified: timer_proc.c --- Diff:
https://github.com/kamailio/kamailio/commit/f0313ae9edcaa2db39d265377e2f803…
Patch:
https://github.com/kamailio/kamailio/commit/f0313ae9edcaa2db39d265377e2f803…
--- diff --git a/timer_proc.c b/timer_proc.c index ed52218..ba87e7e 100644 --- a/timer_proc.c +++ b/timer_proc.c @@ -278,13 +278,14 @@ int fork_sync_utimer(int child_id, char* desc, int make_sock, } +/* number of slots in the wheel timer */ #define SR_WTIMER_SIZE 16 typedef struct sr_wtimer_node { struct sr_wtimer_node *next; - uint32_t interval; - uint32_t steps; - uint32_t cycles; + uint32_t interval; /* frequency of execution (secs) */ + uint32_t steps; /* interval = loops * SR_WTIMER_SIZE + steps */ + uint32_t loops; timer_function* f; void* param; } sr_wtimer_node_t; @@ -335,7 +336,7 @@ int sr_wtimer_add(timer_function* f, void* param, int interval) wt->param = param; wt->interval = interval; wt->steps = interval % SR_WTIMER_SIZE; - wt->cycles = interval / SR_WTIMER_SIZE; + wt->loops = interval / SR_WTIMER_SIZE; wt->next = _sr_wtimer->wlist[wt->steps]; _sr_wtimer->wlist[wt->steps] = wt; @@ -363,7 +364,7 @@ void sr_wtimer_exec(unsigned int ticks, void *param) if(_sr_wtimer->itimer % i == 0) { for(wt=_sr_wtimer->wlist[i % SR_WTIMER_SIZE]; wt!=NULL; wt = wt->next) { - if(wt->cycles==0 || (c % wt->cycles==0)) { + if(wt->loops==0 || (c % wt->loops==0)) { wt->f(ticks, wt->param); } }
8 years, 10 months
1
0
0
0
git:master:d3e0674c: pua: if from_tag is not set, use empty string for db val
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d3e0674c97ad9df80dd995269674e09728558db2 URL:
https://github.com/kamailio/kamailio/commit/d3e0674c97ad9df80dd995269674e09…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-01-25T23:16:38+01:00 pua: if from_tag is not set, use empty string for db val - sqlite connector doesn't like null pointer for not null costraint - reported by GH #345 --- Modified: modules/pua/pua.c --- Diff:
https://github.com/kamailio/kamailio/commit/d3e0674c97ad9df80dd995269674e09…
Patch:
https://github.com/kamailio/kamailio/commit/d3e0674c97ad9df80dd995269674e09…
--- diff --git a/modules/pua/pua.c b/modules/pua/pua.c index 44eb709..181ef93 100644 --- a/modules/pua/pua.c +++ b/modules/pua/pua.c @@ -1107,7 +1107,13 @@ static void db_update(unsigned int ticks,void *param) q_vals[callid_col].val.str_val.s = ""; q_vals[callid_col].val.str_val.len = 0; } - q_vals[fromtag_col].val.str_val = p->from_tag; + if( p->from_tag.s) { + q_vals[fromtag_col].val.str_val = p->from_tag; + } else { + LM_DBG("p->from_tag is empty\n"); + q_vals[fromtag_col].val.str_val.s = ""; + q_vals[fromtag_col].val.str_val.len = 0; + } q_vals[cseq_col].val.int_val= p->cseq; q_vals[expires_col].val.int_val = p->expires; q_vals[desired_expires_col].val.int_val = p->desired_expires;
8 years, 10 months
1
0
0
0
git:master:bffa9b32: Merge pull request #485 from kamailio/lazedo/db_text
by lazedo
Module: kamailio Branch: master Commit: bffa9b32e536ff3c21dec7e9c949249a518b8a81 URL:
https://github.com/kamailio/kamailio/commit/bffa9b32e536ff3c21dec7e9c949249…
Author: lazedo <luis.azedo(a)factorlusitano.com> Committer: lazedo <luis.azedo(a)factorlusitano.com> Date: 2016-01-25T13:26:02Z Merge pull request #485 from kamailio/lazedo/db_text db_text: implemented raw query for UPDATE/DELETE/REPLACE --- Modified: modules/db_text/dbt_base.c Modified: modules/db_text/dbt_raw_query.c Modified: modules/db_text/dbt_raw_query.h Modified: modules/db_text/dbt_raw_util.c --- Diff:
https://github.com/kamailio/kamailio/commit/bffa9b32e536ff3c21dec7e9c949249…
Patch:
https://github.com/kamailio/kamailio/commit/bffa9b32e536ff3c21dec7e9c949249…
8 years, 10 months
1
0
0
0
[kamailio] db_text: implemented raw query for UPDATE/DELETE/REPLACE (#485)
by lazedo
also fixes db_free_result for non select operations also improves replace by exiting on first match You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/485
-- Commit Summary -- * db_text: implemented raw query for UPDATE/DELETE/REPLACE -- File Changes -- M modules/db_text/dbt_base.c (5) M modules/db_text/dbt_raw_query.c (326) M modules/db_text/dbt_raw_query.h (3) M modules/db_text/dbt_raw_util.c (48) -- Patch Links --
https://github.com/kamailio/kamailio/pull/485.patch
https://github.com/kamailio/kamailio/pull/485.diff
--- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/485
8 years, 10 months
2
2
0
0
git:master:53fb42ad: db_text: implemented raw query for UPDATE/DELETE/REPLACE
by Luis Azedo
Module: kamailio Branch: master Commit: 53fb42ad1ca108bfd579bf9846c73255cb33766c URL:
https://github.com/kamailio/kamailio/commit/53fb42ad1ca108bfd579bf9846c7325…
Author: lazedo <luis.azedo(a)factorlusitano.com> Committer: Luis Azedo <luis(a)2600hz.com> Date: 2016-01-25T11:04:49Z db_text: implemented raw query for UPDATE/DELETE/REPLACE also fixes db_free_result for non select operations also improves replace by exiting on first match --- Modified: modules/db_text/dbt_base.c Modified: modules/db_text/dbt_raw_query.c Modified: modules/db_text/dbt_raw_query.h Modified: modules/db_text/dbt_raw_util.c --- Diff:
https://github.com/kamailio/kamailio/commit/53fb42ad1ca108bfd579bf9846c7325…
Patch:
https://github.com/kamailio/kamailio/commit/53fb42ad1ca108bfd579bf9846c7325…
8 years, 10 months
1
0
0
0
[kamailio] Error in writing to sqlite DB (pua) when db_mode = 0 (#345)
by sternik
Hello. I'm testing module presence with pua and pua_usrloc. Unfortunately, despite turning off (db_mode 0) writing to DB, it does. With no luck, because `db_sqlite_commit` return ERROR. Bellow logs of this operation: ``` Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: presence [publish.c:75]: msg_presentity_clean(): cleaning expired presentity information Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: db_sqlite [dbase.c:183]: db_sqlite_submit_query(): submit_query: select username,domain,etag,event from presentity where expires<?1 AND expires>?2 order by us ername Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: <core> [db_res.c:116]: db_new_result(): allocate 56 bytes for result set at 0x7f086c1428c0 Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: presence [publish.c:116]: msg_presentity_clean(): found n= 0 expires messages#012 Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 0 columns Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7f086c1428c0 Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: db_sqlite [dbase.c:183]: db_sqlite_submit_query(): submit_query: delete from presentity where expires<?1 AND expires>?2 Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: presence [subscribe.c:734]: msg_watchers_clean(): cleaning pending subscriptions Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: db_sqlite [dbase.c:183]: db_sqlite_submit_query(): submit_query: delete from watchers where inserted_time<?1 AND status=?2 Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: presence [subscribe.c:2318]: timer_db_update(): db_update timer Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: presence [subscribe.c:1984]: update_db_subs_timer_dbnone(): update_db_subs_timer_dbnone: start Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: pua [pua.c:1098]: db_update(): INSERTDB_FLAG Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: DEBUG: db_sqlite [dbase.c:183]: db_sqlite_submit_query(): submit_query: insert into pua (pres_uri,pres_id,flag,event,watcher_uri,call_id,to_tag,from_tag,etag,tuple_i d,cseq,expires,desired_expires,record_route,contact,remote_contact,version,extra_headers ) values (?1,?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,?12,?13,?14,?15,?16,?17,?18) Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: ERROR: db_sqlite [dbase.c:489]: db_sqlite_commit(): sqlite commit failed: NOT NULL constraint failed: pua.call_id Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: ERROR: db_sqlite [dbase.c:138]: db_sqlite_cleanup_query(): finalize failed: NOT NULL constraint failed: pua.call_id Sep 24 12:40:18 f76fd4ccce03 kamailio[305]: ERROR: pua [pua.c:1179]: db_update(): while inserting in db table pua ``` My pua configuration: ``` modparam("pua", "db_url", PUADBURL) modparam("pua", "db_mode", 0) modparam("pua", "db_table_lock_write", 0) modparam("pua", "outbound_proxy", "sip:127.0.0.1") ``` pua_usrloc: ``` modparam("pua_usrloc", "default_domain", SIPDOMAIN) modparam("pua_usrloc", "entity_prefix", "sip") modparam("pua_usrloc", "branch_flag", FLB_USRLOC) ``` presence: ``` modparam("presence", "db_url", PRESENCEDBURL) modparam("presence", "subs_db_mode", 0) modparam("presence", "publ_cache", 0) modparam("presence", "db_table_lock_type", 0) ``` --- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/345
8 years, 10 months
4
8
0
0
[kamailio] sipcapture README does not document sip_capture script function (#63)
by juha-h
--- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/63
8 years, 10 months
3
5
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
30
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
25
26
27
28
29
30
Results per page:
10
25
50
100
200