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
March 2017
----- 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
31 participants
269 discussions
Start a n
N
ew thread
git:master:980c861e: mtree: safety checks for range within the chars table
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 980c861e39b1fb27de8d7c10390566e516e37fcc URL:
https://github.com/kamailio/kamailio/commit/980c861e39b1fb27de8d7c10390566e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-03-02T22:17:03+01:00 mtree: safety checks for range within the chars table --- Modified: src/modules/mtree/mtree.c --- Diff:
https://github.com/kamailio/kamailio/commit/980c861e39b1fb27de8d7c10390566e…
Patch:
https://github.com/kamailio/kamailio/commit/980c861e39b1fb27de8d7c10390566e…
7 years, 8 months
1
0
0
0
git:5.0:5f86f556: lcr: accept DB1_STR and DB1_STRING db types
by Ovidiu Sas
Module: kamailio Branch: 5.0 Commit: 5f86f556af54849eff7643c0cac24144c3b0da81 URL:
https://github.com/kamailio/kamailio/commit/5f86f556af54849eff7643c0cac2414…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2017-03-02T14:43:19-05:00 lcr: accept DB1_STR and DB1_STRING db types (cherry picked from commit 958b63b9fc500152b6671b90e9a813696a6aaadb) --- Modified: src/modules/lcr/lcr_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/5f86f556af54849eff7643c0cac2414…
Patch:
https://github.com/kamailio/kamailio/commit/5f86f556af54849eff7643c0cac2414…
7 years, 8 months
1
0
0
0
git:5.0:ba743dc6: htable: accept both DB1_STR and DB1_STRING from database
by Ovidiu Sas
Module: kamailio Branch: 5.0 Commit: ba743dc62145d6d9e584e9f4ca150c8e334bdda2 URL:
https://github.com/kamailio/kamailio/commit/ba743dc62145d6d9e584e9f4ca150c8…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2017-03-02T10:59:22-05:00 htable: accept both DB1_STR and DB1_STRING from database (cherry picked from commit 5cdab87aa1093dd372fed624f0de33bd6c13e53a) --- Modified: src/modules/htable/ht_db.c --- Diff:
https://github.com/kamailio/kamailio/commit/ba743dc62145d6d9e584e9f4ca150c8…
Patch:
https://github.com/kamailio/kamailio/commit/ba743dc62145d6d9e584e9f4ca150c8…
--- diff --git a/src/modules/htable/ht_db.c b/src/modules/htable/ht_db.c index fd692ca..6ce3fc9 100644 --- a/src/modules/htable/ht_db.c +++ b/src/modules/htable/ht_db.c @@ -271,19 +271,29 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode) goto error; } - if(RES_ROWS(db_res)[i].values[0].type!=DB1_STRING) { + switch(RES_ROWS(db_res)[i].values[0].type) { + case DB1_STR: + kname.s = (RES_ROWS(db_res)[i].values[0].val.str_val.s); + if(kname.s==NULL) { + LM_ERR("null key in row %d\n", i); + goto error; + } + kname.len = (RES_ROWS(db_res)[i].values[0].val.str_val.len); + break; + case DB1_STRING: + kname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); + if(kname.s==NULL) { + LM_ERR("null key in row %d\n", i); + goto error; + } + kname.len = strlen(kname.s); + break; + default: LM_ERR("key type must be string (type=%d)\n", RES_ROWS(db_res)[i].values[0].type); goto error; } - kname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); - if(kname.s==NULL) { - LM_ERR("null key in row %d\n", i); - goto error; - } - kname.len = strlen(kname.s); - if(ht->ncols>0) { if(ht_pack_values(ht, db_res, i, ncols, &val.s)<0) { LM_ERR("Error packing values\n");
7 years, 8 months
1
0
0
0
git:master:5cdab87a: htable: accept both DB1_STR and DB1_STRING from database
by Ovidiu Sas
Module: kamailio Branch: master Commit: 5cdab87aa1093dd372fed624f0de33bd6c13e53a URL:
https://github.com/kamailio/kamailio/commit/5cdab87aa1093dd372fed624f0de33b…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2017-03-02T10:57:39-05:00 htable: accept both DB1_STR and DB1_STRING from database --- Modified: src/modules/htable/ht_db.c --- Diff:
https://github.com/kamailio/kamailio/commit/5cdab87aa1093dd372fed624f0de33b…
Patch:
https://github.com/kamailio/kamailio/commit/5cdab87aa1093dd372fed624f0de33b…
--- diff --git a/src/modules/htable/ht_db.c b/src/modules/htable/ht_db.c index fd692ca..6ce3fc9 100644 --- a/src/modules/htable/ht_db.c +++ b/src/modules/htable/ht_db.c @@ -271,19 +271,29 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode) goto error; } - if(RES_ROWS(db_res)[i].values[0].type!=DB1_STRING) { + switch(RES_ROWS(db_res)[i].values[0].type) { + case DB1_STR: + kname.s = (RES_ROWS(db_res)[i].values[0].val.str_val.s); + if(kname.s==NULL) { + LM_ERR("null key in row %d\n", i); + goto error; + } + kname.len = (RES_ROWS(db_res)[i].values[0].val.str_val.len); + break; + case DB1_STRING: + kname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); + if(kname.s==NULL) { + LM_ERR("null key in row %d\n", i); + goto error; + } + kname.len = strlen(kname.s); + break; + default: LM_ERR("key type must be string (type=%d)\n", RES_ROWS(db_res)[i].values[0].type); goto error; } - kname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); - if(kname.s==NULL) { - LM_ERR("null key in row %d\n", i); - goto error; - } - kname.len = strlen(kname.s); - if(ht->ncols>0) { if(ht_pack_values(ht, db_res, i, ncols, &val.s)<0) { LM_ERR("Error packing values\n");
7 years, 8 months
1
0
0
0
git:master:e712d32f: topos_redis: update fields and reduce expires for termintated dialogs
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: e712d32f9304f95b5b19b26905546b4af700298f URL:
https://github.com/kamailio/kamailio/commit/e712d32f9304f95b5b19b26905546b4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-03-02T16:40:41+01:00 topos_redis: update fields and reduce expires for termintated dialogs --- Modified: src/modules/topos_redis/topos_redis_storage.c --- Diff:
https://github.com/kamailio/kamailio/commit/e712d32f9304f95b5b19b26905546b4…
Patch:
https://github.com/kamailio/kamailio/commit/e712d32f9304f95b5b19b26905546b4…
7 years, 8 months
1
0
0
0
git:master:5851bf01: topos_redis: set expire for dialog and branch records
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 5851bf01ba33c89c9eef5ac5ed8681369627a0aa URL:
https://github.com/kamailio/kamailio/commit/5851bf01ba33c89c9eef5ac5ed86813…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-03-02T16:09:52+01:00 topos_redis: set expire for dialog and branch records --- Modified: src/modules/topos_redis/topos_redis_storage.c --- Diff:
https://github.com/kamailio/kamailio/commit/5851bf01ba33c89c9eef5ac5ed86813…
Patch:
https://github.com/kamailio/kamailio/commit/5851bf01ba33c89c9eef5ac5ed86813…
--- diff --git a/src/modules/topos_redis/topos_redis_storage.c b/src/modules/topos_redis/topos_redis_storage.c index 204d9fb..08ead91 100644 --- a/src/modules/topos_redis/topos_redis_storage.c +++ b/src/modules/topos_redis/topos_redis_storage.c @@ -42,6 +42,7 @@ extern str _topos_redis_serverid; extern ndb_redis_api_t _tps_redis_api; +extern topos_api_t _tps_api; static str _tps_redis_bprefix = str_init("b:x:"); static str _tps_redis_dprefix = str_init("d:z:"); @@ -93,6 +94,15 @@ str tt_key_x_tag = str_init("x_tag"); str tt_key_s_method = str_init("s_method"); str tt_key_s_cseq = str_init("s_cseq"); +#define TPS_REDIS_SET_ARGSV(sval, argc, argv, argvlen) \ + do { \ + if((sval)->s!=NULL && (sval)->len>0) { \ + argv[argc] = (sval)->s; \ + argvlen[argc] = (sval)->len; \ + argc++; \ + } \ + } while(0) + #define TPS_REDIS_SET_ARGS(sval, argc, akey, argv, argvlen) \ do { \ if((sval)->s!=NULL && (sval)->len>0) { \ @@ -119,6 +129,14 @@ str tt_key_s_cseq = str_init("s_cseq"); TPS_REDIS_SET_ARGS((sval), argc, akey, argv, argvlen); \ } while(0) +#define TPS_REDIS_SET_ARGNV(nval, rp, sval, argc, argv, argvlen) \ + do { \ + (sval)->s = int2bstr((unsigned long)nval, rp, &(sval)->len); \ + rp = (sval)->s + (sval)->len + 1; \ + TPS_REDIS_SET_ARGSV((sval), argc, argv, argvlen); \ + } while(0) + + /** * */ @@ -230,6 +248,35 @@ int tps_redis_insert_dialog(tps_data_t *td) rkey.len, rkey.s, argc); freeReplyObject(rrpl); + /* set expire for the key */ + argc = 0; + + argv[argc] = "EXPIRE"; + argvlen[argc] = 6; + argc++; + + argv[argc] = rkey.s; + argvlen[argc] = rkey.len; + argc++; + + lval = (unsigned long)_tps_api.get_dialog_expire(); + if(lval==0) { + return 0; + } + TPS_REDIS_SET_ARGNV(lval, rp, &rval, argc, argv, argvlen); + + rrpl = _tps_redis_api.exec_argv(rsrv, argc, (const char **)argv, argvlen); + if(rrpl==NULL) { + LM_ERR("failed to execute expireredis command\n"); + if(rsrv->ctxRedis->err) { + LM_ERR("redis error: %s\n", rsrv->ctxRedis->errstr); + } + return -1; + } + LM_DBG("expire set on dialog record for [%.*s] with argc %d\n", + rkey.len, rkey.s, argc); + freeReplyObject(rrpl); + return 0; } @@ -328,6 +375,35 @@ int tps_redis_insert_branch(tps_data_t *td) freeReplyObject(rrpl); + /* set expire for the key */ + argc = 0; + + argv[argc] = "EXPIRE"; + argvlen[argc] = 6; + argc++; + + argv[argc] = rkey.s; + argvlen[argc] = rkey.len; + argc++; + + lval = (unsigned long)_tps_api.get_dialog_expire(); + if(lval==0) { + return 0; + } + TPS_REDIS_SET_ARGNV(lval, rp, &rval, argc, argv, argvlen); + + rrpl = _tps_redis_api.exec_argv(rsrv, argc, (const char **)argv, argvlen); + if(rrpl==NULL) { + LM_ERR("failed to execute expireredis command\n"); + if(rsrv->ctxRedis->err) { + LM_ERR("redis error: %s\n", rsrv->ctxRedis->errstr); + } + return -1; + } + LM_DBG("expire set on branch record for [%.*s] with argc %d\n", + rkey.len, rkey.s, argc); + freeReplyObject(rrpl); + return 0; }
7 years, 8 months
1
0
0
0
git:master:83a8c977: topos: api functions to get dialog and branch expire values
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 83a8c97798d9dbac7e67203e4a246b6013503c01 URL:
https://github.com/kamailio/kamailio/commit/83a8c97798d9dbac7e67203e4a246b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-03-02T15:12:05+01:00 topos: api functions to get dialog and branch expire values --- Modified: src/modules/topos/api.h Modified: src/modules/topos/topos_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/83a8c97798d9dbac7e67203e4a246b6…
Patch:
https://github.com/kamailio/kamailio/commit/83a8c97798d9dbac7e67203e4a246b6…
--- diff --git a/src/modules/topos/api.h b/src/modules/topos/api.h index 1e27416..ab36672 100644 --- a/src/modules/topos/api.h +++ b/src/modules/topos/api.h @@ -56,12 +56,16 @@ typedef struct tps_storage_api { typedef int (*tps_set_storage_api_f)(tps_storage_api_t *tsa); int tps_set_storage_api(tps_storage_api_t *tsa); +typedef int (*tps_get_dialog_expire_f)(void); +typedef int (*tps_get_branch_expire_f)(void); /** * @brief TOPOS API structure */ typedef struct topos_api { tps_set_storage_api_f set_storage_api; + tps_get_dialog_expire_f get_dialog_expire; + tps_get_branch_expire_f get_branch_expire; } topos_api_t; typedef int (*bind_topos_f)(topos_api_t* api); diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c index 7e33605..14297f7 100644 --- a/src/modules/topos/topos_mod.c +++ b/src/modules/topos/topos_mod.c @@ -383,6 +383,22 @@ int tps_msg_sent(void *data) /** * */ +int tps_get_dialog_expire(void) +{ + return _tps_dialog_expire; +} + +/** + * + */ +int tps_get_branch_expire(void) +{ + return _tps_branch_expire; +} + +/** + * + */ int bind_topos(topos_api_t *api) { if (!api) { @@ -391,6 +407,8 @@ int bind_topos(topos_api_t *api) } memset(api, 0, sizeof(topos_api_t)); api->set_storage_api = tps_set_storage_api; + api->get_dialog_expire = tps_get_dialog_expire; + api->get_branch_expire = tps_get_branch_expire; return 0; }
7 years, 8 months
1
0
0
0
git:master:a43d8460: topos: proper detection of direction for requests within dialog
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: a43d8460f4caca20f42f0eb44ec4bd9e22cb1513 URL:
https://github.com/kamailio/kamailio/commit/a43d8460f4caca20f42f0eb44ec4bd9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-03-01T23:41:12+01:00 topos: proper detection of direction for requests within dialog - related to GH #1005 --- Modified: src/modules/topos/tps_msg.c --- Diff:
https://github.com/kamailio/kamailio/commit/a43d8460f4caca20f42f0eb44ec4bd9…
Patch:
https://github.com/kamailio/kamailio/commit/a43d8460f4caca20f42f0eb44ec4bd9…
--- diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c index 8c976b3..aa470e2 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c @@ -867,6 +867,7 @@ int tps_request_sent(sip_msg_t *msg, int dialog, int local) tps_data_t stsd; tps_data_t *ptsd; str lkey; + str ftag; str xuuid; int direction = TPS_DIR_DOWNSTREAM; @@ -907,6 +908,23 @@ int tps_request_sent(sip_msg_t *msg, int dialog, int local) if(tps_storage_load_dialog(msg, &mtsd, &stsd)==0) { ptsd = &stsd; } + /* detect direction - get from-tag */ + if(parse_from_header(msg)<0 || msg->from==NULL) { + LM_ERR("failed getting 'from' header!\n"); + goto error; + } + ftag = get_from(msg)->tag_value; + + if(stsd.a_tag.len!=ftag.len) { + direction = TPS_DIR_UPSTREAM; + } else { + if(memcmp(stsd.a_tag.s, ftag.s, ftag.len)==0) { + direction = TPS_DIR_DOWNSTREAM; + } else { + direction = TPS_DIR_UPSTREAM; + } + } + mtsd.direction = direction; } /* local generated requests */
7 years, 8 months
1
0
0
0
git:master:3c773fd9: Makefile.groups: added topos_redis to redis group
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 3c773fd93045a2f3b88cf80bc0218c321718622d URL:
https://github.com/kamailio/kamailio/commit/3c773fd93045a2f3b88cf80bc0218c3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-03-01T23:29:44+01:00 Makefile.groups: added topos_redis to redis group --- Modified: src/Makefile.groups --- Diff:
https://github.com/kamailio/kamailio/commit/3c773fd93045a2f3b88cf80bc0218c3…
Patch:
https://github.com/kamailio/kamailio/commit/3c773fd93045a2f3b88cf80bc0218c3…
--- diff --git a/src/Makefile.groups b/src/Makefile.groups index 04b78eb..e4412ee 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups @@ -153,7 +153,7 @@ mod_list_jansson=jansson mod_list_jansson_event=janssonrpcc # - modules depending on redis library -mod_list_redis=ndb_redis +mod_list_redis=ndb_redis topos_redis # - modules depending on mono library mod_list_mono=app_mono
7 years, 8 months
1
0
0
0
git:master:f07fc80d: htable: documentation fix for expires_column parameter
by Ovidiu Sas
Module: kamailio Branch: master Commit: f07fc80df5f475606ac81c2885cbedbdb3dca438 URL:
https://github.com/kamailio/kamailio/commit/f07fc80df5f475606ac81c2885cbedb…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: 2017-03-01T16:03:19-05:00 htable: documentation fix for expires_column parameter --- Modified: src/modules/htable/README Modified: src/modules/htable/doc/htable_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/f07fc80df5f475606ac81c2885cbedb…
Patch:
https://github.com/kamailio/kamailio/commit/f07fc80df5f475606ac81c2885cbedb…
7 years, 8 months
2
4
0
0
← Newer
1
...
23
24
25
26
27
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
Results per page:
10
25
50
100
200