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
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
November 2024
----- 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
20 participants
367 discussions
Start a n
N
ew thread
git:master:cfb20d3c: core: added event_route[core:modinit-before]
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: cfb20d3ca3bc87199664b34754b15526d49bbff7 URL:
https://github.com/kamailio/kamailio/commit/cfb20d3ca3bc87199664b34754b1552…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-11-22T11:16:18+01:00 core: added event_route[core:modinit-before] - executed by core once before the module-init callbacks are run --- Modified: src/core/events.c Modified: src/core/events.h Modified: src/main.c --- Diff:
https://github.com/kamailio/kamailio/commit/cfb20d3ca3bc87199664b34754b1552…
Patch:
https://github.com/kamailio/kamailio/commit/cfb20d3ca3bc87199664b34754b1552…
--- diff --git a/src/core/events.c b/src/core/events.c index 6f108914ba1..4274bce58e0 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -26,6 +26,7 @@ #include "dprint.h" #include "mem/mem.h" #include "route.h" +#include "fmsg.h" #include "events.h" static sr_event_cb_t _sr_events_list; @@ -77,6 +78,36 @@ void sr_core_ert_run(sip_msg_t *msg, int e) } } +/** + * + */ +int sr_core_ert_run_xname(char *evname) +{ + struct run_act_ctx ctx; + int rtb; + int ridx; + sip_msg_t *fmsg; + + fmsg = faked_msg_get_next_clear(); + if(fmsg == NULL) { + LM_ERR("cannot create a fake message\n"); + return -1; + } + ridx = route_lookup(&event_rt, evname); + if(ridx <= 0 || event_rt.rlist[ridx] == NULL) { + LM_DBG("event_route[%s] not defined - skipping\n", evname); + return 0; + } + + rtb = get_route_type(); + set_route_type(REQUEST_ROUTE); + init_run_actions_ctx(&ctx); + run_top_route(event_rt.rlist[ridx], fmsg, &ctx); + set_route_type(rtb); + + return 0; +} + /** * */ diff --git a/src/core/events.h b/src/core/events.h index 083acdcec81..cf1ec91d554 100644 --- a/src/core/events.h +++ b/src/core/events.h @@ -89,6 +89,7 @@ int sr_event_enabled(int type); void sr_core_ert_init(void); void sr_core_ert_run(sip_msg_t *msg, int e); +int sr_core_ert_run_xname(char *evname); typedef void (*sr_corecb_void_f)(void); typedef struct sr_corecb diff --git a/src/main.c b/src/main.c index 1b9e599fe5c..6aacc523db8 100644 --- a/src/main.c +++ b/src/main.c @@ -3333,6 +3333,8 @@ int main(int argc, char **argv) #endif /* USE_TLS */ #endif /* USE_TCP */ + sr_core_ert_run_xname("core:modinit-before"); + if(init_modules() != 0) { fprintf(stderr, "ERROR: error while initializing modules\n"); goto error;
1 month
1
0
0
0
git:master:1580d0b0: rr: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 1580d0b0f8742269c6f5b6bb99ac7a96b9f83276 URL:
https://github.com/kamailio/kamailio/commit/1580d0b0f8742269c6f5b6bb99ac7a9…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T11:10:53+01:00 rr: add fixup_free* to exported functions --- Modified: src/modules/rr/rr_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/1580d0b0f8742269c6f5b6bb99ac7a9…
Patch:
https://github.com/kamailio/kamailio/commit/1580d0b0f8742269c6f5b6bb99ac7a9…
--- diff --git a/src/modules/rr/rr_mod.c b/src/modules/rr/rr_mod.c index 78d335695c6..8bce1dea3dc 100644 --- a/src/modules/rr/rr_mod.c +++ b/src/modules/rr/rr_mod.c @@ -73,6 +73,7 @@ static void mod_destroy(void); /* fixup functions */ static int direction_fixup(void **param, int param_no); static int it_list_fixup(void **param, int param_no); +static int it_list_fixup_free(void **param, int param_no); /* wrapper functions */ static int w_loose_route(struct sip_msg *, char *, char *); static int w_loose_route_preloaded(struct sip_msg *, char *, char *); @@ -106,15 +107,15 @@ static cmd_export_t cmds[] = { {"record_route", (cmd_function)w_record_route, 0, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, {"record_route", (cmd_function)w_record_route, 1, - it_list_fixup, 0, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, + it_list_fixup, it_list_fixup_free, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, {"record_route_preset", (cmd_function)w_record_route_preset, 1, - it_list_fixup, 0, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, + it_list_fixup, it_list_fixup_free, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, {"record_route_preset", (cmd_function)w_record_route_preset, 2, - it_list_fixup, 0, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, + it_list_fixup, it_list_fixup_free, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, {"record_route_advertised_address", (cmd_function)w_record_route_advertised_address, 1, - it_list_fixup, 0, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, + it_list_fixup, it_list_fixup_free, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, {"add_rr_param", (cmd_function)w_add_rr_param, 1, - it_list_fixup, 0, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, + it_list_fixup, it_list_fixup_free, REQUEST_ROUTE | BRANCH_ROUTE | FAILURE_ROUTE}, {"check_route_param", (cmd_function)w_check_route_param, 1, fixup_regexp_null, fixup_free_regexp_null, REQUEST_ROUTE}, {"is_direction", (cmd_function)w_is_direction, 1, @@ -233,6 +234,11 @@ static int it_list_fixup(void **param, int param_no) return 0; } +static int it_list_fixup_free(void **param, int param_no) +{ + pv_elem_free_all(*param); + return 0; +} static int direction_fixup(void **param, int param_no) {
1 month
1
0
0
0
git:master:4c157538: rr: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: 4c157538046dcc70aebf549522a960bca2c25bfd URL:
https://github.com/kamailio/kamailio/commit/4c157538046dcc70aebf549522a960b…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T11:08:31+01:00 rr: reformat exported structures --- Modified: src/modules/rr/rr_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/4c157538046dcc70aebf549522a960b…
Patch:
https://github.com/kamailio/kamailio/commit/4c157538046dcc70aebf549522a960b…
1 month
1
0
0
0
git:master:fcf8454c: rtimer: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: fcf8454c982c09c6cc89669b7327d000b5c154d9 URL:
https://github.com/kamailio/kamailio/commit/fcf8454c982c09c6cc89669b7327d00…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T11:05:03+01:00 rtimer: reformat exported structures --- Modified: src/modules/rtimer/rtimer_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/fcf8454c982c09c6cc89669b7327d00…
Patch:
https://github.com/kamailio/kamailio/commit/fcf8454c982c09c6cc89669b7327d00…
--- diff --git a/src/modules/rtimer/rtimer_mod.c b/src/modules/rtimer/rtimer_mod.c index b5b122a6829..5d2249106d4 100644 --- a/src/modules/rtimer/rtimer_mod.c +++ b/src/modules/rtimer/rtimer_mod.c @@ -80,27 +80,34 @@ void stm_main_timer_exec(unsigned int ticks, void *param); int stm_get_worker(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); static int default_interval = 120; - +/* clang-format off */ static pv_export_t rtimer_pvs[] = { - {{"rtimer_worker", (sizeof("rtimer_worker") - 1)}, PVT_OTHER, - stm_get_worker, 0, 0, 0, 0, 0}, - {{0, 0}, 0, 0, 0, 0, 0, 0, 0}}; + {{"rtimer_worker", (sizeof("rtimer_worker") - 1)}, PVT_OTHER, + stm_get_worker, 0, 0, 0, 0, 0}, + {{0, 0}, 0, 0, 0, 0, 0, 0, 0} +}; static param_export_t params[] = { - {"default_interval", PARAM_INT, &default_interval}, - {"timer", PARAM_STRING | PARAM_USE_FUNC, (void *)stm_t_param}, - {"exec", PARAM_STRING | PARAM_USE_FUNC, (void *)stm_e_param}, - {0, 0, 0}}; - + {"default_interval", PARAM_INT, &default_interval}, + {"timer", PARAM_STRING | PARAM_USE_FUNC, (void *)stm_t_param}, + {"exec", PARAM_STRING | PARAM_USE_FUNC, (void *)stm_e_param}, + {0, 0, 0} +}; /** module exports */ -struct module_exports exports = {"rtimer", DEFAULT_DLFLAGS, /* dlopen flags */ - 0, params, 0, /* exported RPC methods */ - rtimer_pvs, /* exported pseudo-variables */ - 0, mod_init, /* module initialization function */ - child_init, /* per-child init function */ - 0}; - +struct module_exports exports = { + "rtimer", + DEFAULT_DLFLAGS, /* dlopen flags */ + 0, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + rtimer_pvs, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + child_init, /* per-child init function */ + 0 /* module destroy function */ +}; +/* clang-format on */ /** * init module function
1 month
1
0
0
0
git:master:1ce99a24: rtjson: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 1ce99a243e22eb8acdc94cc8f7ec98a6846760bf URL:
https://github.com/kamailio/kamailio/commit/1ce99a243e22eb8acdc94cc8f7ec98a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T10:58:55+01:00 rtjson: add fixup_free* to exported functions --- Modified: src/modules/rtjson/rtjson_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/1ce99a243e22eb8acdc94cc8f7ec98a…
Patch:
https://github.com/kamailio/kamailio/commit/1ce99a243e22eb8acdc94cc8f7ec98a…
--- diff --git a/src/modules/rtjson/rtjson_mod.c b/src/modules/rtjson/rtjson_mod.c index 48da0e9f9fa..60ace41542f 100644 --- a/src/modules/rtjson/rtjson_mod.c +++ b/src/modules/rtjson/rtjson_mod.c @@ -49,7 +49,7 @@ static int w_rtjson_update_branch(sip_msg_t *msg, char *p1, char *p2); /* clang-format off */ static cmd_export_t cmds[] = { {"rtjson_init_routes", (cmd_function)w_rtjson_init_routes, 1, - fixup_spve_null, 0, REQUEST_ROUTE}, + fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE}, {"rtjson_push_routes", (cmd_function)w_rtjson_push_routes, 0, 0, 0, REQUEST_ROUTE}, {"rtjson_next_route", (cmd_function)w_rtjson_next_route, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE}, {"rtjson_update_branch", (cmd_function)w_rtjson_update_branch, 0, 0, 0, BRANCH_ROUTE},
1 month
1
0
0
0
git:master:82206086: rtjson: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: 82206086f4adf17fa25dae248b49d930532bddd3 URL:
https://github.com/kamailio/kamailio/commit/82206086f4adf17fa25dae248b49d93…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T10:58:24+01:00 rtjson: reformat exported structures --- Modified: src/modules/rtjson/rtjson_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/82206086f4adf17fa25dae248b49d93…
Patch:
https://github.com/kamailio/kamailio/commit/82206086f4adf17fa25dae248b49d93…
--- diff --git a/src/modules/rtjson/rtjson_mod.c b/src/modules/rtjson/rtjson_mod.c index 4661b2ca386..48da0e9f9fa 100644 --- a/src/modules/rtjson/rtjson_mod.c +++ b/src/modules/rtjson/rtjson_mod.c @@ -46,29 +46,34 @@ static int w_rtjson_push_routes(sip_msg_t *msg, char *p1, char *p2); static int w_rtjson_next_route(sip_msg_t *msg, char *p1, char *p2); static int w_rtjson_update_branch(sip_msg_t *msg, char *p1, char *p2); +/* clang-format off */ static cmd_export_t cmds[] = { - {"rtjson_init_routes", (cmd_function)w_rtjson_init_routes, 1, - fixup_spve_null, 0, REQUEST_ROUTE}, - {"rtjson_push_routes", (cmd_function)w_rtjson_push_routes, 0, 0, 0, - REQUEST_ROUTE}, - {"rtjson_next_route", (cmd_function)w_rtjson_next_route, 0, 0, 0, - REQUEST_ROUTE | FAILURE_ROUTE}, - {"rtjson_update_branch", (cmd_function)w_rtjson_update_branch, 0, 0, 0, - BRANCH_ROUTE}, - {0, 0, 0, 0, 0, 0}}; + {"rtjson_init_routes", (cmd_function)w_rtjson_init_routes, 1, + fixup_spve_null, 0, REQUEST_ROUTE}, + {"rtjson_push_routes", (cmd_function)w_rtjson_push_routes, 0, 0, 0, REQUEST_ROUTE}, + {"rtjson_next_route", (cmd_function)w_rtjson_next_route, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE}, + {"rtjson_update_branch", (cmd_function)w_rtjson_update_branch, 0, 0, 0, BRANCH_ROUTE}, + {0, 0, 0, 0, 0, 0} +}; static param_export_t params[] = { - {"xavp_cfg", PARAM_STR, &_rtjson_xavp_name}, {0, 0, 0}}; + {"xavp_cfg", PARAM_STR, &_rtjson_xavp_name}, + {0, 0, 0} +}; struct module_exports exports = { - "rtjson", DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, params, 0, /* exported RPC methods */ - 0, /* exported pseudo-variables */ - 0, /* response function */ - mod_init, /* module initialization function */ - child_init, /* per child init function */ - mod_destroy /* destroy function */ + "rtjson", + DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + 0, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + child_init, /* per-child init function */ + mod_destroy /* module destroy function */ }; +/* clang-format on */ /** * init module function
1 month
1
0
0
0
git:master:07134cb4: rtp_media_server: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 07134cb4c2cf66cf2e7e6ba738559c3c1209645a URL:
https://github.com/kamailio/kamailio/commit/07134cb4c2cf66cf2e7e6ba738559c3…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T10:55:49+01:00 rtp_media_server: add fixup_free* to exported functions --- Modified: src/modules/rtp_media_server/rtp_media_server.c --- Diff:
https://github.com/kamailio/kamailio/commit/07134cb4c2cf66cf2e7e6ba738559c3…
Patch:
https://github.com/kamailio/kamailio/commit/07134cb4c2cf66cf2e7e6ba738559c3…
--- diff --git a/src/modules/rtp_media_server/rtp_media_server.c b/src/modules/rtp_media_server/rtp_media_server.c index 3e5de0635a6..07a0ebd068b 100644 --- a/src/modules/rtp_media_server/rtp_media_server.c +++ b/src/modules/rtp_media_server/rtp_media_server.c @@ -43,8 +43,11 @@ static int child_init(int); static rms_dialog_info_t *rms_dialog_create_leg( rms_dialog_info_t *di, struct sip_msg *msg); static int fixup_rms_action_play(void **param, int param_no); +static int fixup_free_rms_action_play(void **param, int param_no); static int fixup_rms_bridge(void **param, int param_no); +static int fixup_free_rms_bridge(void **param, int param_no); static int fixup_rms_answer(void **param, int param_no); +static int fixup_free_rms_answer(void **param, int param_no); static int rms_hangup_call(rms_dialog_info_t *di); static int rms_bridging_call(rms_dialog_info_t *di, rms_action_t *a); static int rms_bridged_call(rms_dialog_info_t *di, rms_action_t *a); @@ -62,15 +65,15 @@ static int rms_update_media_sockets( /* clang-format off */ static cmd_export_t cmds[] = { {"rms_answer", (cmd_function)rms_answer_f, 1, - fixup_rms_answer, 0, EVENT_ROUTE}, + fixup_rms_answer, fixup_free_rms_answer, EVENT_ROUTE}, {"rms_sip_request", (cmd_function)rms_sip_request_f, 0, 0, 0, EVENT_ROUTE}, {"rms_play", (cmd_function)rms_action_play_f, 2, - fixup_rms_action_play, 0, ANY_ROUTE}, + fixup_rms_action_play, fixup_free_rms_action_play, ANY_ROUTE}, {"rms_dialog_check", (cmd_function)rms_dialog_check_f, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, {"rms_hangup", (cmd_function)rms_hangup_f, 0, 0, 0, EVENT_ROUTE}, {"rms_bridge", (cmd_function)rms_bridge_f, 2, - fixup_rms_bridge, 0, ANY_ROUTE}, + fixup_rms_bridge, fixup_free_rms_bridge, ANY_ROUTE}, {"rms_dialogs_dump", (cmd_function)rms_dialogs_dump_f, 0, 0, 0, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -156,6 +159,13 @@ static int fixup_rms_bridge(void **param, int param_no) return -1; } +static int fixup_free_rms_bridge(void **param, int param_no) +{ + if(param_no == 1 || param_no == 2) + return fixup_free_spve_null(param, 1); + return 0; +} + static int fixup_rms_answer(void **param, int param_no) { if(param_no == 1 || param_no == 2) @@ -164,6 +174,13 @@ static int fixup_rms_answer(void **param, int param_no) return -1; } +static int fixup_free_rms_answer(void **param, int param_no) +{ + if(param_no == 1 || param_no == 2) + return fixup_free_spve_null(param, 1); + return 0; +} + static int fixup_rms_action_play(void **param, int param_no) { if(param_no == 1 || param_no == 2 || param_no == 3) @@ -172,6 +189,13 @@ static int fixup_rms_action_play(void **param, int param_no) return -1; } +static int fixup_free_rms_action_play(void **param, int param_no) +{ + if(param_no == 1 || param_no == 2) + return fixup_free_spve_null(param, 1); + return 0; +} + /** * @return 0 to continue to load Kamailio, -1 to stop the loading * and abort Kamailio.
1 month
1
0
0
0
git:master:744243d2: rtp_media_server: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: 744243d290946644fe0248b2eaa5591d5f9e985f URL:
https://github.com/kamailio/kamailio/commit/744243d290946644fe0248b2eaa5591…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T10:52:14+01:00 rtp_media_server: reformat exported structures --- Modified: src/modules/rtp_media_server/rtp_media_server.c --- Diff:
https://github.com/kamailio/kamailio/commit/744243d290946644fe0248b2eaa5591…
Patch:
https://github.com/kamailio/kamailio/commit/744243d290946644fe0248b2eaa5591…
--- diff --git a/src/modules/rtp_media_server/rtp_media_server.c b/src/modules/rtp_media_server/rtp_media_server.c index a41b5715022..3e5de0635a6 100644 --- a/src/modules/rtp_media_server/rtp_media_server.c +++ b/src/modules/rtp_media_server/rtp_media_server.c @@ -59,20 +59,21 @@ static int rms_bridge_f(struct sip_msg *, char *, char *); static int rms_update_media_sockets( struct sip_msg *msg, rms_dialog_info_t *di, rms_sdp_info_t *sdp_info); -static cmd_export_t cmds[] = {{"rms_answer", (cmd_function)rms_answer_f, 1, - fixup_rms_answer, 0, EVENT_ROUTE}, - {"rms_sip_request", (cmd_function)rms_sip_request_f, 0, 0, 0, - EVENT_ROUTE}, - {"rms_play", (cmd_function)rms_action_play_f, 2, fixup_rms_action_play, - 0, ANY_ROUTE}, - {"rms_dialog_check", (cmd_function)rms_dialog_check_f, 0, 0, 0, - REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, - {"rms_hangup", (cmd_function)rms_hangup_f, 0, 0, 0, EVENT_ROUTE}, - {"rms_bridge", (cmd_function)rms_bridge_f, 2, fixup_rms_bridge, 0, - ANY_ROUTE}, - {"rms_dialogs_dump", (cmd_function)rms_dialogs_dump_f, 0, 0, 0, - ANY_ROUTE}, - {0, 0, 0, 0, 0, 0}}; +/* clang-format off */ +static cmd_export_t cmds[] = { + {"rms_answer", (cmd_function)rms_answer_f, 1, + fixup_rms_answer, 0, EVENT_ROUTE}, + {"rms_sip_request", (cmd_function)rms_sip_request_f, 0, 0, 0, EVENT_ROUTE}, + {"rms_play", (cmd_function)rms_action_play_f, 2, + fixup_rms_action_play, 0, ANY_ROUTE}, + {"rms_dialog_check", (cmd_function)rms_dialog_check_f, 0, + 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, + {"rms_hangup", (cmd_function)rms_hangup_f, 0, 0, 0, EVENT_ROUTE}, + {"rms_bridge", (cmd_function)rms_bridge_f, 2, + fixup_rms_bridge, 0, ANY_ROUTE}, + {"rms_dialogs_dump", (cmd_function)rms_dialogs_dump_f, 0, 0, 0, ANY_ROUTE}, + {0, 0, 0, 0, 0, 0} +}; static param_export_t mod_params[] = { {"log_file_name", PARAM_STR, &log_fn}, {0, 0, 0}}; @@ -89,6 +90,7 @@ struct module_exports exports = { child_init, mod_destroy, }; +/* clang-format on */ static void run_action_route(rms_dialog_info_t *di, char *route) {
1 month
1
0
0
0
git:master:fa142bbe: rtpengine: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: fa142bbe6327df2cc6c2cf8e942b9207cb6fe62b URL:
https://github.com/kamailio/kamailio/commit/fa142bbe6327df2cc6c2cf8e942b920…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T10:47:17+01:00 rtpengine: add fixup_free* to exported functions --- Modified: src/modules/rtpengine/rtpengine.c --- Diff:
https://github.com/kamailio/kamailio/commit/fa142bbe6327df2cc6c2cf8e942b920…
Patch:
https://github.com/kamailio/kamailio/commit/fa142bbe6327df2cc6c2cf8e942b920…
1 month
1
0
0
0
git:master:907f213c: rtpproxy: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 907f213cfc93d860a30b839ab4f1ce1690b358ac URL:
https://github.com/kamailio/kamailio/commit/907f213cfc93d860a30b839ab4f1ce1…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-11-22T10:36:06+01:00 rtpproxy: add fixup_free* to exported functions --- Modified: src/modules/rtpproxy/rtpproxy.c Modified: src/modules/rtpproxy/rtpproxy_stream.c Modified: src/modules/rtpproxy/rtpproxy_stream.h --- Diff:
https://github.com/kamailio/kamailio/commit/907f213cfc93d860a30b839ab4f1ce1…
Patch:
https://github.com/kamailio/kamailio/commit/907f213cfc93d860a30b839ab4f1ce1…
--- diff --git a/src/modules/rtpproxy/rtpproxy.c b/src/modules/rtpproxy/rtpproxy.c index 57f4f4b05e5..6d358d73d46 100644 --- a/src/modules/rtpproxy/rtpproxy.c +++ b/src/modules/rtpproxy/rtpproxy.c @@ -134,6 +134,7 @@ static int rtpproxy_manage2(struct sip_msg *msg, char *flags, char *ip); static int add_rtpproxy_socks(struct rtpp_set *rtpp_list, char *rtpproxy); static int fixup_set_id(void **param, int param_no); +static int fixup_free_set_id(void **param, int param_no); static int set_rtp_proxy_set_f(struct sip_msg *msg, char *str1, char *str2); static struct rtpp_set *select_rtpp_set(int id_set); @@ -194,28 +195,28 @@ static pv_elem_t *extra_id_pv = NULL; /* clang-format off */ static cmd_export_t cmds[] = { {"set_rtp_proxy_set", (cmd_function)set_rtp_proxy_set_f, 1, - fixup_set_id, 0, ANY_ROUTE}, + fixup_set_id, fixup_free_set_id, ANY_ROUTE}, {"unforce_rtp_proxy", (cmd_function)unforce_rtp_proxy1_f, 0, 0, 0, ANY_ROUTE}, {"rtpproxy_destroy", (cmd_function)unforce_rtp_proxy1_f, 0, 0, 0, ANY_ROUTE}, {"unforce_rtp_proxy", (cmd_function)unforce_rtp_proxy1_f, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"rtpproxy_destroy", (cmd_function)unforce_rtp_proxy1_f, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"start_recording", (cmd_function)start_recording_f, 0, 0, 0, ANY_ROUTE}, {"rtpproxy_offer", (cmd_function)rtpproxy_offer1_f, 0, 0, 0, ANY_ROUTE}, {"rtpproxy_offer", (cmd_function)rtpproxy_offer1_f, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"rtpproxy_offer", (cmd_function)rtpproxy_offer2_f, 2, - fixup_spve_spve, 0, ANY_ROUTE}, + fixup_spve_spve, fixup_free_spve_spve, ANY_ROUTE}, {"rtpproxy_answer", (cmd_function)rtpproxy_answer1_f, 0, 0, 0, ANY_ROUTE}, {"rtpproxy_answer", (cmd_function)rtpproxy_answer1_f, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"rtpproxy_answer", (cmd_function)rtpproxy_answer2_f, 2, - fixup_spve_spve, 0, ANY_ROUTE}, + fixup_spve_spve, fixup_free_spve_spve, ANY_ROUTE}, {"rtpproxy_stream2uac", (cmd_function)rtpproxy_stream2uac2_f, 2, - fixup_var_str_int, 0, ANY_ROUTE}, + fixup_var_str_int, fixup_free_var_str_int, ANY_ROUTE}, {"rtpproxy_stream2uas", (cmd_function)rtpproxy_stream2uas2_f, 2, - fixup_var_str_int, 0, ANY_ROUTE}, + fixup_var_str_int, fixup_free_var_str_int, ANY_ROUTE}, {"rtpproxy_stop_stream2uac", (cmd_function)rtpproxy_stop_stream2uac2_f, 0, 0, 0, ANY_ROUTE}, {"rtpproxy_stop_stream2uas", (cmd_function)rtpproxy_stop_stream2uas2_f, 0, 0, 0, ANY_ROUTE}, {"rtpproxy_manage", (cmd_function)rtpproxy_manage0, 0, 0, 0, ANY_ROUTE}, @@ -553,6 +554,12 @@ static int fixup_set_id(void **param, int param_no) return 0; } +static int fixup_free_set_id(void **param, int param_no) +{ + pkg_free(*param); + return 0; +} + static void rtpproxy_rpc_enable(rpc_t *rpc, void *ctx) { str rtpp_url; diff --git a/src/modules/rtpproxy/rtpproxy_stream.c b/src/modules/rtpproxy/rtpproxy_stream.c index 625a8e7f368..da02d00e3fc 100644 --- a/src/modules/rtpproxy/rtpproxy_stream.c +++ b/src/modules/rtpproxy/rtpproxy_stream.c @@ -70,6 +70,14 @@ int fixup_var_str_int(void **param, int param_no) return 0; } +int fixup_free_var_str_int(void **param, int param_no) +{ + if(param_no == 1) { + pv_elem_free_all(*param); + } + return 0; +} + int rtpproxy_stream(struct sip_msg *msg, str *pname, int count, int stream2uac) { int nitems; diff --git a/src/modules/rtpproxy/rtpproxy_stream.h b/src/modules/rtpproxy/rtpproxy_stream.h index 377cac4279e..b5fd6bb9a4d 100644 --- a/src/modules/rtpproxy/rtpproxy_stream.h +++ b/src/modules/rtpproxy/rtpproxy_stream.h @@ -29,6 +29,7 @@ #define _RTPPROXY_STREAM_H int fixup_var_str_int(void **, int); +int fixup_free_var_str_int(void **, int); int rtpproxy_stream(struct sip_msg *msg, str *pname, int count, int stream2uac); int rtpproxy_stream2uac2_f(struct sip_msg *, char *, char *); int rtpproxy_stream2uas2_f(struct sip_msg *, char *, char *);
1 month
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
37
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
34
35
36
37
Results per page:
10
25
50
100
200