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
2025
June
May
April
March
February
January
2024
December
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 2019
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 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
323 discussions
Start a n
N
ew thread
git:5.2:a7f6227e: app_lua: get lua execution stack for previous level
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: 5.2 Commit: a7f6227efe8228444a8afd17e548640ca8458beb URL:
https://github.com/kamailio/kamailio/commit/a7f6227efe8228444a8afd17e548640…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T19:38:07+01:00 app_lua: get lua execution stack for previous level - returns the info where current function was executed (cherry picked from commit a15210d064e08ac8b1a271502360b7066bff43b6) --- Modified: src/modules/app_lua/app_lua_sr.c --- Diff:
https://github.com/kamailio/kamailio/commit/a7f6227efe8228444a8afd17e548640…
Patch:
https://github.com/kamailio/kamailio/commit/a7f6227efe8228444a8afd17e548640…
--- diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c index 7b1322ee21..d223975f04 100644 --- a/src/modules/app_lua/app_lua_sr.c +++ b/src/modules/app_lua/app_lua_sr.c @@ -1942,7 +1942,7 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) + (tve.tv_usec - tvb.tv_usec); if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) { memset(&dinfo, 0, sizeof(lua_Debug)); - if(lua_getstack(L, 0, &dinfo)>0 + if(lua_getstack(L, 1, &dinfo)>0 && lua_getinfo(L, "nSl", &dinfo)>0) { LOG(cfg_get(core, core_cfg, latency_log), "alert - action KSR.%s%s%s(...)"
1
0
0
0
git:master:a15210d0: app_lua: get lua execution stack for previous level
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: a15210d064e08ac8b1a271502360b7066bff43b6 URL:
https://github.com/kamailio/kamailio/commit/a15210d064e08ac8b1a271502360b70…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T19:33:22+01:00 app_lua: get lua execution stack for previous level - returns the info where current function was executed --- Modified: src/modules/app_lua/app_lua_sr.c --- Diff:
https://github.com/kamailio/kamailio/commit/a15210d064e08ac8b1a271502360b70…
Patch:
https://github.com/kamailio/kamailio/commit/a15210d064e08ac8b1a271502360b70…
--- diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c index 041cb32182..72cbc7180b 100644 --- a/src/modules/app_lua/app_lua_sr.c +++ b/src/modules/app_lua/app_lua_sr.c @@ -1952,7 +1952,7 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) + (tve.tv_usec - tvb.tv_usec); if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) { memset(&dinfo, 0, sizeof(lua_Debug)); - if(lua_getstack(L, 0, &dinfo)>0 + if(lua_getstack(L, 1, &dinfo)>0 && lua_getinfo(L, "nSl", &dinfo)>0) { LOG(cfg_get(core, core_cfg, latency_log), "alert - action KSR.%s%s%s(...)"
1
0
0
0
git:5.2:b3a6b044: app_lua: use lib functions for execution time and check return for lua debug
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: 5.2 Commit: b3a6b0446832f3267e9bf05744b0c12d499c4205 URL:
https://github.com/kamailio/kamailio/commit/b3a6b0446832f3267e9bf05744b0c12…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T19:23:10+01:00 app_lua: use lib functions for execution time and check return for lua debug (cherry picked from commit 6900c85821aeba9b947a8ed6e2b7632644fc2a04) --- Modified: src/modules/app_lua/app_lua_sr.c --- Diff:
https://github.com/kamailio/kamailio/commit/b3a6b0446832f3267e9bf05744b0c12…
Patch:
https://github.com/kamailio/kamailio/commit/b3a6b0446832f3267e9bf05744b0c12…
--- diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c index 5baa1a368e..7b1322ee21 100644 --- a/src/modules/app_lua/app_lua_sr.c +++ b/src/modules/app_lua/app_lua_sr.c @@ -1922,28 +1922,34 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) { sr_kemi_t *ket; int ret; - unsigned int ms = 0; + struct timeval tvb, tve; + struct timezone tz; + unsigned int tdiff; lua_Debug dinfo; ket = sr_kemi_lua_export_get(eidx); - if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) { - ms = TICKS_TO_MS(get_ticks_raw()); + if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0) + && is_printable(cfg_get(core, core_cfg, latency_log))) { + gettimeofday(&tvb, &tz); } ret = sr_kemi_lua_exec_func_ex(L, ket, 0); - if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) { - ms = TICKS_TO_MS(get_ticks_raw()) - ms; - if(ms >= cfg_get(core, core_cfg, latency_limit_action) - && is_printable(cfg_get(core, core_cfg, latency_log))) { + if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0) + && is_printable(cfg_get(core, core_cfg, latency_log))) { + gettimeofday(&tve, &tz); + tdiff = (tve.tv_sec - tvb.tv_sec) * 1000000 + + (tve.tv_usec - tvb.tv_usec); + if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) { memset(&dinfo, 0, sizeof(lua_Debug)); - if(lua_getstack(L, 0, &dinfo)==0 - && lua_getinfo(L, "nSl", &dinfo)==0) { + if(lua_getstack(L, 0, &dinfo)>0 + && lua_getinfo(L, "nSl", &dinfo)>0) { LOG(cfg_get(core, core_cfg, latency_log), "alert - action KSR.%s%s%s(...)" " took too long [%u ms] (%s:%d - %s [%s])\n", (ket->mname.len>0)?ket->mname.s:"", - (ket->mname.len>0)?".":"", ket->fname.s, ms, + (ket->mname.len>0)?".":"", ket->fname.s, + tdiff, (dinfo.short_src[0])?dinfo.short_src:"<unknown>", dinfo.currentline, (dinfo.name)?dinfo.name:"<unknown>", @@ -1953,7 +1959,8 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) "alert - action KSR.%s%s%s(...)" " took too long [%u ms]\n", (ket->mname.len>0)?ket->mname.s:"", - (ket->mname.len>0)?".":"", ket->fname.s, ms); + (ket->mname.len>0)?".":"", ket->fname.s, + tdiff); } } }
1
0
0
0
git:5.2:c108904c: app_lua: use lua_getstack() to init structure for debug info
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: 5.2 Commit: c108904cee314e8b3c2c1d0382a0830a9b2796df URL:
https://github.com/kamailio/kamailio/commit/c108904cee314e8b3c2c1d0382a0830…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T19:22:15+01:00 app_lua: use lua_getstack() to init structure for debug info (cherry picked from commit 47cde53eb257898c25212523d013bd7e74a30b28) --- Modified: src/modules/app_lua/app_lua_sr.c --- Diff:
https://github.com/kamailio/kamailio/commit/c108904cee314e8b3c2c1d0382a0830…
Patch:
https://github.com/kamailio/kamailio/commit/c108904cee314e8b3c2c1d0382a0830…
--- diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c index 65d811a9c1..5baa1a368e 100644 --- a/src/modules/app_lua/app_lua_sr.c +++ b/src/modules/app_lua/app_lua_sr.c @@ -1936,14 +1936,25 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) ms = TICKS_TO_MS(get_ticks_raw()) - ms; if(ms >= cfg_get(core, core_cfg, latency_limit_action) && is_printable(cfg_get(core, core_cfg, latency_log))) { - lua_getinfo(L, "nSl", &dinfo); - LOG(cfg_get(core, core_cfg, latency_log), - "alert - action KSR.%s%s%s(...)" - " took too long [%u ms] (%s:%d - %s [%s])\n", - (ket->mname.len>0)?ket->mname.s:"", - (ket->mname.len>0)?".":"", ket->fname.s, ms, - dinfo.short_src, dinfo.currentline, - (dinfo.name?dinfo.name:"<unknown>"), dinfo.what); + memset(&dinfo, 0, sizeof(lua_Debug)); + if(lua_getstack(L, 0, &dinfo)==0 + && lua_getinfo(L, "nSl", &dinfo)==0) { + LOG(cfg_get(core, core_cfg, latency_log), + "alert - action KSR.%s%s%s(...)" + " took too long [%u ms] (%s:%d - %s [%s])\n", + (ket->mname.len>0)?ket->mname.s:"", + (ket->mname.len>0)?".":"", ket->fname.s, ms, + (dinfo.short_src[0])?dinfo.short_src:"<unknown>", + dinfo.currentline, + (dinfo.name)?dinfo.name:"<unknown>", + (dinfo.what)?dinfo.what:"<unknown>"); + } else { + LOG(cfg_get(core, core_cfg, latency_log), + "alert - action KSR.%s%s%s(...)" + " took too long [%u ms]\n", + (ket->mname.len>0)?ket->mname.s:"", + (ket->mname.len>0)?".":"", ket->fname.s, ms); + } } }
1
0
0
0
git:master:6900c858: app_lua: use lib functions for execution time and check return for lua debug
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: 6900c85821aeba9b947a8ed6e2b7632644fc2a04 URL:
https://github.com/kamailio/kamailio/commit/6900c85821aeba9b947a8ed6e2b7632…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T18:52:34+01:00 app_lua: use lib functions for execution time and check return for lua debug --- Modified: src/modules/app_lua/app_lua_sr.c --- Diff:
https://github.com/kamailio/kamailio/commit/6900c85821aeba9b947a8ed6e2b7632…
Patch:
https://github.com/kamailio/kamailio/commit/6900c85821aeba9b947a8ed6e2b7632…
--- diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c index bd3773e46c..041cb32182 100644 --- a/src/modules/app_lua/app_lua_sr.c +++ b/src/modules/app_lua/app_lua_sr.c @@ -1932,28 +1932,34 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) { sr_kemi_t *ket; int ret; - unsigned int ms = 0; + struct timeval tvb, tve; + struct timezone tz; + unsigned int tdiff; lua_Debug dinfo; ket = sr_kemi_lua_export_get(eidx); - if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) { - ms = TICKS_TO_MS(get_ticks_raw()); + if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0) + && is_printable(cfg_get(core, core_cfg, latency_log))) { + gettimeofday(&tvb, &tz); } ret = sr_kemi_lua_exec_func_ex(L, ket, 0); - if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) { - ms = TICKS_TO_MS(get_ticks_raw()) - ms; - if(ms >= cfg_get(core, core_cfg, latency_limit_action) - && is_printable(cfg_get(core, core_cfg, latency_log))) { + if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0) + && is_printable(cfg_get(core, core_cfg, latency_log))) { + gettimeofday(&tve, &tz); + tdiff = (tve.tv_sec - tvb.tv_sec) * 1000000 + + (tve.tv_usec - tvb.tv_usec); + if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) { memset(&dinfo, 0, sizeof(lua_Debug)); - if(lua_getstack(L, 0, &dinfo)==0 - && lua_getinfo(L, "nSl", &dinfo)==0) { + if(lua_getstack(L, 0, &dinfo)>0 + && lua_getinfo(L, "nSl", &dinfo)>0) { LOG(cfg_get(core, core_cfg, latency_log), "alert - action KSR.%s%s%s(...)" " took too long [%u ms] (%s:%d - %s [%s])\n", (ket->mname.len>0)?ket->mname.s:"", - (ket->mname.len>0)?".":"", ket->fname.s, ms, + (ket->mname.len>0)?".":"", ket->fname.s, + tdiff, (dinfo.short_src[0])?dinfo.short_src:"<unknown>", dinfo.currentline, (dinfo.name)?dinfo.name:"<unknown>", @@ -1963,7 +1969,8 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx) "alert - action KSR.%s%s%s(...)" " took too long [%u ms]\n", (ket->mname.len>0)?ket->mname.s:"", - (ket->mname.len>0)?".":"", ket->fname.s, ms); + (ket->mname.len>0)?".":"", ket->fname.s, + tdiff); } } }
1
0
0
0
git:master:2dc54bed: cfgutils: exported sleep() and usleep() to kemi framework
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: 2dc54bed090636bd442f59c09af210ebdf322442 URL:
https://github.com/kamailio/kamailio/commit/2dc54bed090636bd442f59c09af210e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T18:50:27+01:00 cfgutils: exported sleep() and usleep() to kemi framework --- Modified: src/modules/cfgutils/cfgutils.c --- Diff:
https://github.com/kamailio/kamailio/commit/2dc54bed090636bd442f59c09af210e…
Patch:
https://github.com/kamailio/kamailio/commit/2dc54bed090636bd442f59c09af210e…
--- diff --git a/src/modules/cfgutils/cfgutils.c b/src/modules/cfgutils/cfgutils.c index e62012cd14..02d7c46c54 100644 --- a/src/modules/cfgutils/cfgutils.c +++ b/src/modules/cfgutils/cfgutils.c @@ -623,6 +623,12 @@ static int m_sleep(struct sip_msg *msg, char *time, char *str2) return 1; } +static int ki_sleep(sip_msg_t* msg, int v) +{ + sleep((unsigned int)v); + return 1; +} + static int m_usleep(struct sip_msg *msg, char *time, char *str2) { int s; @@ -635,6 +641,12 @@ static int m_usleep(struct sip_msg *msg, char *time, char *str2) return 1; } +static int ki_usleep(sip_msg_t* msg, int v) +{ + sleep_us((unsigned int)v); + return 1; +} + static int dbg_abort(struct sip_msg* msg, char* foo, char* bar) { LM_CRIT("abort called\n"); @@ -1055,6 +1067,16 @@ static sr_kemi_t sr_kemi_cfgutils_exports[] = { { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, + { str_init("cfgutils"), str_init("sleep"), + SR_KEMIP_INT, ki_sleep, + { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("cfgutils"), str_init("usleep"), + SR_KEMIP_INT, ki_usleep, + { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } };
1
0
0
0
git:master:c7f4837e: kamctl: added acc initdb command
by Daniel-Constantin Mierla
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: c7f4837e2e2d55e294e699e0a3a8173cde77ef83 URL:
https://github.com/kamailio/kamailio/commit/c7f4837e2e2d55e294e699e0a3a8173…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2019-03-28T17:43:29+01:00 kamctl: added acc initdb command - command to add additional columns needed with default kamailio.cfg and defined WITH_ACCDB for acc and missed_calls table --- Modified: utils/kamctl/kamctl Modified: utils/kamctl/kamctl.base --- Diff:
https://github.com/kamailio/kamailio/commit/c7f4837e2e2d55e294e699e0a3a8173…
Patch:
https://github.com/kamailio/kamailio/commit/c7f4837e2e2d55e294e699e0a3a8173…
--- diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl index 3a25443355..a5f51803d8 100755 --- a/utils/kamctl/kamctl +++ b/utils/kamctl/kamctl @@ -2345,6 +2345,32 @@ acc() { shift; require_dbengine case $1 in + initdb) + QUERY=$(cat <<-END +ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT ''; +ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT ''; +ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default ''; +ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT ''; +ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT ''; +ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT ''; +ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT ''; +ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT ''; +ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL default ''; +ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT ''; +ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT ''; +ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT ''; +END +) + $DBCMD "$QUERY" + if [ $? -ne 0 ] ; then + merr "error - acc db init" + exit 1 + fi + + mecho "ok - acc db init" + + ;; + showdb) QUERY="select * FROM $ACC_TABLE ;" $DBROCMD "$QUERY" diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base index 16f61e04a5..46494f5a04 100644 --- a/utils/kamctl/kamctl.base +++ b/utils/kamctl/kamctl.base @@ -577,6 +577,7 @@ usage_acc() { mecho " -- command 'acc' - manage accounding records" echo cat <<EOF + acc initdb .................. init acc table by adding extra colums acc showdb .................. show content of acc table recent [<secs>] ............. show most recent records in acc (default 300s) EOF
1
0
0
0
git:master:4e91dc32: Merge pull request #1914 from marcocapetta/master
by GitHub
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: 4e91dc3222d9bb6e41317d4ca0eabe95a933c45a URL:
https://github.com/kamailio/kamailio/commit/4e91dc3222d9bb6e41317d4ca0eabe9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: GitHub <noreply(a)github.com> Date: 2019-03-28T17:17:57+01:00 Merge pull request #1914 from marcocapetta/master Small fixes to dialplan module when an avp is used as subst_exp --- Modified: src/modules/dialplan/dp_repl.c --- Diff:
https://github.com/kamailio/kamailio/commit/4e91dc3222d9bb6e41317d4ca0eabe9…
Patch:
https://github.com/kamailio/kamailio/commit/4e91dc3222d9bb6e41317d4ca0eabe9…
--- diff --git a/src/modules/dialplan/dp_repl.c b/src/modules/dialplan/dp_repl.c index 06762ce6d2..06534a9dab 100644 --- a/src/modules/dialplan/dp_repl.c +++ b/src/modules/dialplan/dp_repl.c @@ -432,7 +432,7 @@ int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, /*search for the pattern from the compiled subst_exp*/ if (pcre_exec(subst_comp, NULL, instr->s, instr->len, 0, 0, ovector, 3 * (MAX_REPLACE_WITH + 1)) <= 0) { - LM_ERR("the string %.*s matched " + LM_DBG("the string %.*s matched " "the match_exp %.*s but not the subst_exp %.*s!\n", instr->len, instr->s, rule->match_exp.len, rule->match_exp.s, @@ -700,7 +700,7 @@ int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, } } if(rulep->tflags&DP_TFLAGS_PV_SUBST) { - re_list = dpl_dynamic_pcre_list(msg, &rulep->match_exp); + re_list = dpl_dynamic_pcre_list(msg, &rulep->subst_exp); if(re_list==NULL) { /* failed to compile dynamic pcre -- ignore */ LM_DBG("failed to compile dynamic pcre[%.*s]\n", @@ -721,6 +721,13 @@ int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, pkg_free(re_list); re_list = rt; } while(re_list); + if(rez<0) { + LM_ERR("the string %.*s matched " + "the match_exp %.*s but not the subst_exp %.*s!\n", + input->len, input->s, + rulep->match_exp.len, rulep->match_exp.s, + rulep->subst_exp.len, rulep->subst_exp.s); + } } else { if(rule_translate(msg, input, rulep, rulep->subst_comp, output)!=0){
1
0
0
0
git:master:de529a68: dialplan: fixed error log in rule_translate
by Marco Capetta
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: de529a682afa37482fdc7992e5224c89298c07d3 URL:
https://github.com/kamailio/kamailio/commit/de529a682afa37482fdc7992e5224c8…
Author: Marco Capetta <mcapetta(a)sipwise.com> Committer: Marco Capetta <mcapetta(a)sipwise.com> Date: 2019-03-28T14:03:54+01:00 dialplan: fixed error log in rule_translate - Print an error line only if the string fails a match with all the subst_exp avp values. --- Modified: src/modules/dialplan/dp_repl.c --- Diff:
https://github.com/kamailio/kamailio/commit/de529a682afa37482fdc7992e5224c8…
Patch:
https://github.com/kamailio/kamailio/commit/de529a682afa37482fdc7992e5224c8…
--- diff --git a/src/modules/dialplan/dp_repl.c b/src/modules/dialplan/dp_repl.c index 2cd568ca5f..06534a9dab 100644 --- a/src/modules/dialplan/dp_repl.c +++ b/src/modules/dialplan/dp_repl.c @@ -432,7 +432,7 @@ int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, /*search for the pattern from the compiled subst_exp*/ if (pcre_exec(subst_comp, NULL, instr->s, instr->len, 0, 0, ovector, 3 * (MAX_REPLACE_WITH + 1)) <= 0) { - LM_ERR("the string %.*s matched " + LM_DBG("the string %.*s matched " "the match_exp %.*s but not the subst_exp %.*s!\n", instr->len, instr->s, rule->match_exp.len, rule->match_exp.s, @@ -721,6 +721,13 @@ int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, pkg_free(re_list); re_list = rt; } while(re_list); + if(rez<0) { + LM_ERR("the string %.*s matched " + "the match_exp %.*s but not the subst_exp %.*s!\n", + input->len, input->s, + rulep->match_exp.len, rulep->match_exp.s, + rulep->subst_exp.len, rulep->subst_exp.s); + } } else { if(rule_translate(msg, input, rulep, rulep->subst_comp, output)!=0){
1
0
0
0
git:master:bd231e71: dialplan: fixed avp usage in subst_exp field
by Marco Capetta
28 Mar '19
28 Mar '19
Module: kamailio Branch: master Commit: bd231e718976d954c1bee95c508fec113e80b52e URL:
https://github.com/kamailio/kamailio/commit/bd231e718976d954c1bee95c508fec1…
Author: Marco Capetta <mcapetta(a)sipwise.com> Committer: Marco Capetta <mcapetta(a)sipwise.com> Date: 2019-03-28T12:29:10+01:00 dialplan: fixed avp usage in subst_exp field - in case both match_exp and subst_exp contain avps, the content of match_exp were used to evaluate the substitute expression. --- Modified: src/modules/dialplan/dp_repl.c --- Diff:
https://github.com/kamailio/kamailio/commit/bd231e718976d954c1bee95c508fec1…
Patch:
https://github.com/kamailio/kamailio/commit/bd231e718976d954c1bee95c508fec1…
--- diff --git a/src/modules/dialplan/dp_repl.c b/src/modules/dialplan/dp_repl.c index 06762ce6d2..2cd568ca5f 100644 --- a/src/modules/dialplan/dp_repl.c +++ b/src/modules/dialplan/dp_repl.c @@ -700,7 +700,7 @@ int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, } } if(rulep->tflags&DP_TFLAGS_PV_SUBST) { - re_list = dpl_dynamic_pcre_list(msg, &rulep->match_exp); + re_list = dpl_dynamic_pcre_list(msg, &rulep->subst_exp); if(re_list==NULL) { /* failed to compile dynamic pcre -- ignore */ LM_DBG("failed to compile dynamic pcre[%.*s]\n",
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
33
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
31
32
33
Results per page:
10
25
50
100
200