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
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
June 2020
----- 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
24 participants
395 discussions
Start a n
N
ew thread
git:master:936a49a1: core: events - added out buffer field to event structure
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 936a49a11ea88425bec4ad9b9e6ec69549e0fe34 URL:
https://github.com/kamailio/kamailio/commit/936a49a11ea88425bec4ad9b9e6ec69…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T18:45:58+02:00 core: events - added out buffer field to event structure --- Modified: src/core/events.h --- Diff:
https://github.com/kamailio/kamailio/commit/936a49a11ea88425bec4ad9b9e6ec69…
Patch:
https://github.com/kamailio/kamailio/commit/936a49a11ea88425bec4ad9b9e6ec69…
--- diff --git a/src/core/events.h b/src/core/events.h index f13c64a83a..2208d8038d 100644 --- a/src/core/events.h +++ b/src/core/events.h @@ -43,6 +43,7 @@ typedef struct sr_event_param { void *data; + str obuf; receive_info_t* rcv; dest_info_t *dst; sip_msg_t *req;
4 years, 6 months
1
0
0
0
git:master:13329ce0: modules: readme files regenerated - corex ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: 13329ce04a6c082920b959e47d49bee1b8171e70 URL:
https://github.com/kamailio/kamailio/commit/13329ce04a6c082920b959e47d49bee…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2020-06-18T17:16:17+02:00 modules: readme files regenerated - corex ... [skip ci] --- Modified: src/modules/corex/README --- Diff:
https://github.com/kamailio/kamailio/commit/13329ce04a6c082920b959e47d49bee…
Patch:
https://github.com/kamailio/kamailio/commit/13329ce04a6c082920b959e47d49bee…
4 years, 6 months
1
0
0
0
git:master:5e9a0dba: corex: docs for evcb_reply_out param and event_route[corex:reply-out]
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 5e9a0dba1f1f12222c807332ef6fc8df233fc7ab URL:
https://github.com/kamailio/kamailio/commit/5e9a0dba1f1f12222c807332ef6fc8d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T17:09:50+02:00 corex: docs for evcb_reply_out param and event_route[corex:reply-out] --- Modified: src/modules/corex/doc/corex_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/5e9a0dba1f1f12222c807332ef6fc8d…
Patch:
https://github.com/kamailio/kamailio/commit/5e9a0dba1f1f12222c807332ef6fc8d…
--- diff --git a/src/modules/corex/doc/corex_admin.xml b/src/modules/corex/doc/corex_admin.xml index 203ada5d2f..96c6fe4ae3 100644 --- a/src/modules/corex/doc/corex_admin.xml +++ b/src/modules/corex/doc/corex_admin.xml @@ -147,6 +147,26 @@ modparam("corex", "alias_subdomains", "udp:sip-router.org:5060") modparam("corex", "dns_cache", "type=A;name=kamailio.org;addr=193.22.119.66;ttl=3600000;flags=0") modparam("corex", "dns_cache", "type=AAAA;name=kamailio.org;addr=2a00:d60:0:400::2;ttl=3600000;flags=0") ... +</programlisting> + </example> + </section> + <section id="corex.p.evcb_reply_out"> + <title><varname>evcb_reply_out</varname> (string)</title> + <para> + Name of KEMI callback function to be executed instead of + event_route[corex:reply-out]. + </para> + <para> + <emphasis> + Default value is <quote>NULL</quote>. + </emphasis> + </para> + <example> + <title>Set <varname>evcb_reply_out</varname> parameter</title> + <programlisting format="linespecific"> +... +modparam("corex", "evcb_reply_out", "ksr_corex_reply_out") +... </programlisting> </example> </section> @@ -953,7 +973,7 @@ event_route[dispatcher:dst-down] { <section> <title>Event Routes</title> - <section id="async.evr.network_io"> + <section id="corex.evr.network_msg"> <title> <function moreinfo="none">event_route[network:msg]</function> </title> @@ -981,6 +1001,14 @@ event_route[dispatcher:dst-down] { no module functions or pseudo variables are available in this event route. </para> </section> + <section id="corex.evr.reply_out"> + <title> + <function moreinfo="none">event_route[corex:reply-out]</function> + </title> + <para> + Event route block to be executed when a SIP reply is sent out. + </para> + </section> </section> <section>
4 years, 6 months
1
0
0
0
git:master:35360a5f: corex: event route when a sip reply is sent out
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 35360a5f99eb96d57d7bdab9d32f1f7db6dc0006 URL:
https://github.com/kamailio/kamailio/commit/35360a5f99eb96d57d7bdab9d32f1f7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T16:40:37+02:00 corex: event route when a sip reply is sent out --- Modified: src/modules/corex/corex_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/35360a5f99eb96d57d7bdab9d32f1f7…
Patch:
https://github.com/kamailio/kamailio/commit/35360a5f99eb96d57d7bdab9d32f1f7…
--- diff --git a/src/modules/corex/corex_mod.c b/src/modules/corex/corex_mod.c index b8b5de0046..8d0e649548 100644 --- a/src/modules/corex/corex_mod.c +++ b/src/modules/corex/corex_mod.c @@ -31,6 +31,8 @@ #include "../../core/pvar.h" #include "../../core/fmsg.h" #include "../../core/kemi.h" +#include "../../core/events.h" +#include "../../core/onsend.h" #include "../../core/dns_cache.h" #include "../../core/parser/parse_uri.h" #include "../../core/parser/parse_param.h" @@ -69,6 +71,8 @@ static int w_is_faked_msg(sip_msg_t *msg, char *p1, char *p2); static int fixup_file_op(void** param, int param_no); static sr_kemi_xval_t _sr_kemi_corex_xval = {0}; +static str corex_evcb_reply_out = STR_NULL; +static int corex_evrt_reply_out_no = -1; int corex_alias_subdomains_param(modparam_t type, void *val); int corex_dns_cache_param(modparam_t type, void *val); @@ -77,6 +81,8 @@ static int mod_init(void); static int child_init(int); static void mod_destroy(void); +static int corex_sip_reply_out(sr_event_param_t *evp); + static pv_export_t mod_pvs[] = { { {"cfg", (sizeof("cfg")-1)}, PVT_OTHER, pv_get_cfg, 0, pv_parse_cfg_name, 0, 0, 0 }, @@ -151,6 +157,7 @@ static param_export_t params[]={ {"nio_intercept", INT_PARAM, &nio_intercept}, {"nio_min_msg_len", INT_PARAM, &nio_min_msg_len}, {"nio_msg_avp", PARAM_STR, &nio_msg_avp_param}, + {"evcb_reply_out", PARAM_STR, &corex_evcb_reply_out}, {0, 0, 0} }; @@ -193,6 +200,11 @@ static int mod_init(void) return -1; } + corex_evrt_reply_out_no = route_lookup(&event_rt, "corex:reply-out"); + + if(corex_evrt_reply_out_no>=0 || corex_evcb_reply_out.len>0) { + sr_event_register_cb(SREV_SIP_REPLY_OUT, corex_sip_reply_out); + } return 0; } @@ -1090,6 +1102,25 @@ static int w_is_faked_msg(sip_msg_t *msg, char *p1, char *p2) return -1; } +/** + * + */ +static int corex_sip_reply_out(sr_event_param_t *evp) +{ + onsend_info_t sndinfo; + str evname = str_init("corex:reply-out"); + + memset(&sndinfo, 0, sizeof(onsend_info_t)); + + if(corex_evrt_reply_out_no>=0 || corex_evcb_reply_out.len>0) { + run_onsend_evroute(&sndinfo, corex_evrt_reply_out_no, + &corex_evcb_reply_out, &evname); + } + + return 0; +} + + /** * */
4 years, 6 months
1
0
0
0
git:master:05e87e66: core: c code for executing route blocks on send out events moved to onsend.c
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 05e87e66cdb398ea9fe5aecc09d521a25a4f5c8e URL:
https://github.com/kamailio/kamailio/commit/05e87e66cdb398ea9fe5aecc09d521a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T16:14:14+02:00 core: c code for executing route blocks on send out events moved to onsend.c - helper functions for executing event_route blocks for send out cases --- Added: src/core/onsend.c Modified: src/core/action.c Modified: src/core/onsend.h --- Diff:
https://github.com/kamailio/kamailio/commit/05e87e66cdb398ea9fe5aecc09d521a…
Patch:
https://github.com/kamailio/kamailio/commit/05e87e66cdb398ea9fe5aecc09d521a…
4 years, 6 months
1
0
0
0
git:master:b49b5661: core: extend onsend structure to include runtime mode and reply code
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b49b56614db5e5d32ba415755bdac75478cc08f2 URL:
https://github.com/kamailio/kamailio/commit/b49b56614db5e5d32ba415755bdac75…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T15:38:53+02:00 core: extend onsend structure to include runtime mode and reply code - runtime mode to be set to local or network traffic on specific cases --- Modified: src/core/onsend.h --- Diff:
https://github.com/kamailio/kamailio/commit/b49b56614db5e5d32ba415755bdac75…
Patch:
https://github.com/kamailio/kamailio/commit/b49b56614db5e5d32ba415755bdac75…
--- diff --git a/src/core/onsend.h b/src/core/onsend.h index e435a27f0a..7913e7dda4 100644 --- a/src/core/onsend.h +++ b/src/core/onsend.h @@ -42,6 +42,8 @@ typedef struct onsend_info{ char* buf; /* outgoing buffer */ int len; /* outgoing buffer len */ sip_msg_t *msg; /* original sip msg struct */ + int rmode; /* runtime execution mode */ + int rplcode; /* reply code */ } onsend_info_t; extern onsend_info_t* p_onsend;
4 years, 6 months
1
0
0
0
git:master:93ab0791: core: event hook for sip reply out
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 93ab0791b409b9a708a1c7ac5cc4f94f7537d2ca URL:
https://github.com/kamailio/kamailio/commit/93ab0791b409b9a708a1c7ac5cc4f94…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T13:18:39+02:00 core: event hook for sip reply out --- Modified: src/core/events.c Modified: src/core/events.h --- Diff:
https://github.com/kamailio/kamailio/commit/93ab0791b409b9a708a1c7ac5cc4f94…
Patch:
https://github.com/kamailio/kamailio/commit/93ab0791b409b9a708a1c7ac5cc4f94…
--- diff --git a/src/core/events.c b/src/core/events.c index 70d7179697..ebe47ee4b1 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -180,6 +180,15 @@ int sr_event_register_cb(int type, sr_event_cb_f f) _sr_events_list.net_data_send = f; else return -1; break; + case SREV_SIP_REPLY_OUT: + for(i=0; i<SREV_CB_LIST_SIZE; i++) { + if(_sr_events_list.sip_reply_out[i]==0) { + _sr_events_list.sip_reply_out[i] = f; + break; + } + } + if(i==SREV_CB_LIST_SIZE) return -1; + break; default: return -1; } @@ -317,6 +326,15 @@ int sr_event_exec(int type, sr_event_param_t *evp) ret = _sr_events_list.net_data_send(evp); return ret; } else return 1; + case SREV_SIP_REPLY_OUT: + if(unlikely(_sr_events_list.net_data_in[0]!=0)) + { + ret = 0; + for(i=0; i<SREV_CB_LIST_SIZE + && _sr_events_list.sip_reply_out[i]; i++) { + ret |= _sr_events_list.sip_reply_out[i](evp); + } + } else return 1; default: return -1; } @@ -358,6 +376,8 @@ int sr_event_enabled(int type) return (_sr_events_list.net_data_recv!=0)?1:0; case SREV_NET_DATA_SEND: return (_sr_events_list.net_data_send!=0)?1:0; + case SREV_SIP_REPLY_OUT: + return (_sr_events_list.sip_reply_out[0]!=0)?1:0; } return 0; } diff --git a/src/core/events.h b/src/core/events.h index df8a313055..f13c64a83a 100644 --- a/src/core/events.h +++ b/src/core/events.h @@ -37,6 +37,7 @@ #define SREV_TCP_CLOSED 13 #define SREV_NET_DATA_RECV 14 #define SREV_NET_DATA_SEND 15 +#define SREV_SIP_REPLY_OUT 16 #define SREV_CB_LIST_SIZE 8 @@ -44,6 +45,10 @@ typedef struct sr_event_param { void *data; receive_info_t* rcv; dest_info_t *dst; + sip_msg_t *req; + sip_msg_t *rpl; + int rplcode; + int mode; } sr_event_param_t; typedef int (*sr_event_cb_f)(sr_event_param_t *evp); @@ -64,6 +69,7 @@ typedef struct sr_event_cb { sr_event_cb_f tcp_closed; sr_event_cb_f net_data_recv; sr_event_cb_f net_data_send; + sr_event_cb_f sip_reply_out[SREV_CB_LIST_SIZE]; } sr_event_cb_t; void sr_event_cb_init(void);
4 years, 6 months
1
0
0
0
git:master:7e402da2: pv: use SIP_REQUEST/SIP_REPLY for value of $mt
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 7e402da261e1ced56019037d3dce9e72b5b2b0ea URL:
https://github.com/kamailio/kamailio/commit/7e402da261e1ced56019037d3dce9e7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T10:31:38+02:00 pv: use SIP_REQUEST/SIP_REPLY for value of $mt --- Modified: src/modules/pv/pv_core.c --- Diff:
https://github.com/kamailio/kamailio/commit/7e402da261e1ced56019037d3dce9e7…
Patch:
https://github.com/kamailio/kamailio/commit/7e402da261e1ced56019037d3dce9e7…
--- diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index 7b28fb966e..f7af431341 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -188,9 +188,9 @@ int pv_get_msgtype(struct sip_msg *msg, pv_param_t *param, return -1; if(msg->first_line.type == SIP_REQUEST) - type = 1; + type = SIP_REQUEST; /* 1 */ else if(msg->first_line.type == SIP_REPLY) - type = 2; + type = SIP_REPLY; /* 2 */ return pv_get_uintval(msg, param, res, type); }
4 years, 6 months
1
0
0
0
git:master:339f24be: modules: readme files regenerated - siputils ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: 339f24be1b28a2ab9702ae19dcc8d09f747ea77b URL:
https://github.com/kamailio/kamailio/commit/339f24be1b28a2ab9702ae19dcc8d09…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2020-06-18T09:01:28+02:00 modules: readme files regenerated - siputils ... [skip ci] --- Modified: src/modules/siputils/README --- Diff:
https://github.com/kamailio/kamailio/commit/339f24be1b28a2ab9702ae19dcc8d09…
Patch:
https://github.com/kamailio/kamailio/commit/339f24be1b28a2ab9702ae19dcc8d09…
4 years, 6 months
1
0
0
0
git:master:65119d91: siputils: docs for uri_param_any(param)
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 65119d916fcd3bf42dff21718e6a4a18c2d5b16e URL:
https://github.com/kamailio/kamailio/commit/65119d916fcd3bf42dff21718e6a4a1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-06-18T08:34:14+02:00 siputils: docs for uri_param_any(param) --- Modified: src/modules/siputils/doc/siputils_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/65119d916fcd3bf42dff21718e6a4a1…
Patch:
https://github.com/kamailio/kamailio/commit/65119d916fcd3bf42dff21718e6a4a1…
--- diff --git a/src/modules/siputils/doc/siputils_admin.xml b/src/modules/siputils/doc/siputils_admin.xml index 8dd72319c0..67e7d1e6c8 100644 --- a/src/modules/siputils/doc/siputils_admin.xml +++ b/src/modules/siputils/doc/siputils_admin.xml @@ -446,6 +446,34 @@ if (uri_param("param1","value1")) { ... }; ... +</programlisting> + </example> + </section> + <section> + <title id="siputils.f.uri_param_any"> + <function moreinfo="none">uri_param_any(param)</function> + </title> + <para> + Find if Request URI has a given parameter with or without value. + </para> + <para>Meaning of the parameters is as follows:</para> + <itemizedlist> + <listitem> + <para><emphasis>param</emphasis> - parameter name to look for. + </para> + </listitem> + </itemizedlist> + <para> + This function can be used from REQUEST_ROUTE. + </para> + <example> + <title><function>uri_param_any</function> usage</title> + <programlisting format="linespecific"> +... +if (uri_param_any("param1")) { + ... +} +... </programlisting> </example> </section>
4 years, 6 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
40
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
38
39
40
Results per page:
10
25
50
100
200