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
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 2025
----- 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
10 participants
178 discussions
Start a n
N
ew thread
git:5.8:f807c4d2: tls: get wss connections as well for selects and vars
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 5.8 Commit: f807c4d249bff27007dc8898a338ad7be4f45ea7 URL:
https://github.com/kamailio/kamailio/commit/f807c4d249bff27007dc8898a338ad7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:30:51+01:00 tls: get wss connections as well for selects and vars - GH #4167 (cherry picked from commit 3a3856c68cf0cc04385921f8bbec72420cf8f656) (cherry picked from commit b3cb2b38c5d81c48b0b6315cb7feb99d236d15e3) --- Modified: src/modules/tls/tls_select.c --- Diff:
https://github.com/kamailio/kamailio/commit/f807c4d249bff27007dc8898a338ad7…
Patch:
https://github.com/kamailio/kamailio/commit/f807c4d249bff27007dc8898a338ad7…
--- diff --git a/src/modules/tls/tls_select.c b/src/modules/tls/tls_select.c index 8b1a0457c0a..ad8654b1050 100644 --- a/src/modules/tls/tls_select.c +++ b/src/modules/tls/tls_select.c @@ -127,14 +127,14 @@ struct tcp_connection *get_cur_connection(struct sip_msg *msg) if(_tls_pv_con != 0) return _tls_pv_con; - if(msg->rcv.proto != PROTO_TLS) { + if(msg->rcv.proto != PROTO_TLS && msg->rcv.proto != PROTO_WSS) { ERR("Transport protocol is not TLS (bug in config)\n"); return 0; } c = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, cfg_get(tls, tls_cfg, con_lifetime)); - if(c && c->type != PROTO_TLS) { + if(c && c->type != PROTO_TLS && msg->rcv.proto != PROTO_WSS) { ERR("Connection found but is not TLS\n"); tcpconn_put(c); return 0;
1
0
0
0
git:5.8:2b0b8714: dialog: enforce second bye towards callee for dlg_bye()
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 5.8 Commit: 2b0b8714b7f75d13be6f8156f4f8efbf6401f0b7 URL:
https://github.com/kamailio/kamailio/commit/2b0b8714b7f75d13be6f8156f4f8efb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:30:45+01:00 dialog: enforce second bye towards callee for dlg_bye() - GH #4169 (cherry picked from commit 7de1693573fc08e54db1955095d66c495b2051b9) (cherry picked from commit 0cbf7eede6dbd3198664160b77d1b4d0337833b8) --- Modified: src/modules/dialog/dlg_req_within.c --- Diff:
https://github.com/kamailio/kamailio/commit/2b0b8714b7f75d13be6f8156f4f8efb…
Patch:
https://github.com/kamailio/kamailio/commit/2b0b8714b7f75d13be6f8156f4f8efb…
--- diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c index 06111e9783f..0b7b140fd61 100644 --- a/src/modules/dialog/dlg_req_within.c +++ b/src/modules/dialog/dlg_req_within.c @@ -374,7 +374,8 @@ static inline int build_extra_hdr( * DLG_CALLER_LEG (0): caller * DLG_CALLEE_LEG (1): callee */ -static inline int send_bye(struct dlg_cell *cell, int dir, str *hdrs) +static inline int send_bye( + struct dlg_cell *cell, int dir, str *hdrs, int enforce) { uac_req_t uac_r; dlg_t *dialog_info; @@ -384,16 +385,15 @@ static inline int send_bye(struct dlg_cell *cell, int dir, str *hdrs) str lhdrs; /* dialog is already in deleted state, nothing to do */ - if(cell->state == DLG_STATE_DELETED) { + if(cell->state == DLG_STATE_DELETED && enforce == 0) { LM_WARN("dlg [%u:%u] with callid %.*s already in deleted state, BYE " "not sent.\n", cell->h_entry, cell->h_id, cell->callid.len, cell->callid.s); - return 0; + return 1; } /* Send Cancel or final response for non-confirmed dialogs */ - if(cell->state != DLG_STATE_CONFIRMED_NA - && cell->state != DLG_STATE_CONFIRMED) { + if(cell->state < DLG_STATE_CONFIRMED_NA) { if(cell->t) { if(dir == DLG_CALLER_LEG) { if(d_tmb.t_reply(cell->t->uas.request, bye_early_code, @@ -841,7 +841,7 @@ int dlg_bye(struct dlg_cell *dlg, str *hdrs, int side) LM_ERR("failed to build dlg headers\n"); return -1; } - ret = send_bye(dlg, side, &all_hdrs); + ret = send_bye(dlg, side, &all_hdrs, 0); pkg_free(all_hdrs.s); dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED); @@ -862,8 +862,10 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs) return -1; } - ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs); - ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs); + ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs, 0); + if(ret == 0) { + ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs, 1); + } pkg_free(all_hdrs.s);
1
0
0
0
git:6.0:00544a66: pua_reginfo: handle_notify - fix AoR key parsing
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 6.0 Commit: 00544a66aad09faf345d54bef7f464f2749ef548 URL:
https://github.com/kamailio/kamailio/commit/00544a66aad09faf345d54bef7f464f…
Author: João Capucho <capucho(a)jcapucho.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:17:09+01:00 pua_reginfo: handle_notify - fix AoR key parsing - The AoR key generated by handle_notify no longer includes the domain of the AoR when usrloc use_domain isn't enabled (cherry picked from commit b7e16294ae1bbfe8cc469facf59fc9e3960ff2a4) --- Modified: src/modules/pua_reginfo/notify.c --- Diff:
https://github.com/kamailio/kamailio/commit/00544a66aad09faf345d54bef7f464f…
Patch:
https://github.com/kamailio/kamailio/commit/00544a66aad09faf345d54bef7f464f…
--- diff --git a/src/modules/pua_reginfo/notify.c b/src/modules/pua_reginfo/notify.c index a390a00f238..23b44caaee9 100644 --- a/src/modules/pua_reginfo/notify.c +++ b/src/modules/pua_reginfo/notify.c @@ -305,10 +305,10 @@ int process_body(str notify_body, udomain_t *domain) if(reginfo_use_domain) { aor_key.s = uri; + aor_key.len = strlen(uri); } else { - aor_key.s = parsed_aor.user.s; + aor_key = parsed_aor.user; } - aor_key.len = strlen(aor_key.s); /* Now let's lock that domain for this AOR: */ ul.lock_udomain(domain, &aor_key); /* and retrieve the user-record for this user: */
1
0
0
0
git:6.0:f24315c2: microhttpd: handle all incoming body data
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 6.0 Commit: f24315c2bc4ec7b9507516a96603e91ae2ce0fd1 URL:
https://github.com/kamailio/kamailio/commit/f24315c2bc4ec7b9507516a96603e91…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:16:47+01:00 microhttpd: handle all incoming body data - GH #4176 (cherry picked from commit 96392eda8fac1cb075e7f407c0155085acc92c5f) --- Modified: src/modules/microhttpd/microhttpd_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/f24315c2bc4ec7b9507516a96603e91…
Patch:
https://github.com/kamailio/kamailio/commit/f24315c2bc4ec7b9507516a96603e91…
--- diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index eaf2820ce68..2853b7b1b5a 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -177,6 +177,13 @@ static void mod_destroy(void) { } +typedef struct ksr_mhd_cstream +{ + int ctype; + int rcvmode; + str data; +} ksr_mhd_cstream_t; + typedef struct ksr_mhttpd_ctx { struct MHD_Connection *connection; @@ -450,23 +457,68 @@ static int fixup_free_mhttpd_send_reply(void **param, int param_no) return 0; } + static enum MHD_Result ksr_microhttpd_request(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **ptr) { - static int _first_callback; sr_kemi_eng_t *keng = NULL; str evname = str_init("microhttpd:request"); sip_msg_t *fmsg = NULL; run_act_ctx_t ctx; int rtb; + ksr_mhd_cstream_t *cstream = NULL; + + cstream = (ksr_mhd_cstream_t *)*ptr; + if(cstream == NULL) { + cstream = (ksr_mhd_cstream_t *)malloc(sizeof(ksr_mhd_cstream_t)); + if(cstream == NULL) { + LM_ERR("no more system memroy\n"); + return MHD_NO; + } + memset(cstream, 0, sizeof(ksr_mhd_cstream_t)); + *ptr = cstream; + } - if(&_first_callback != *ptr) { + if(cstream->rcvmode == 0) { + cstream->rcvmode = 1; /* the first time only the headers are valid, - do not respond in the first round... */ - *ptr = &_first_callback; + * do not respond in the first round */ return MHD_YES; + } else { + if(*upload_data_size != 0) { + char *buf = NULL; + int bsize = 0; + if(cstream->data.s != NULL) { + bsize = *upload_data_size + cstream->data.len + 1; + } else { + bsize = *upload_data_size + 1; + } + buf = (char *)malloc(sizeof(char) * bsize); + if(buf == NULL) { + if(cstream->data.s != NULL) { + free(cstream->data.s); + free(cstream); + *ptr = NULL; + return MHD_NO; + } + } + if(cstream->data.s != NULL) { + snprintf(buf, bsize, "%s%s", cstream->data.s, upload_data); + free(cstream->data.s); + } else { + snprintf(buf, bsize, "%s", upload_data); + } + cstream->data.s = buf; + cstream->data.len = bsize - 1; + *upload_data_size = 0; + return MHD_YES; + } else { + LM_DBG("incoming data: [%.*s]\n", + cstream->data.len <= 64 ? cstream->data.len : 64, + cstream->data.s); + } } *ptr = NULL; /* clear context pointer */ @@ -477,13 +529,19 @@ static enum MHD_Result ksr_microhttpd_request(void *cls, _ksr_mhttpd_ctx.url.len = strlen(_ksr_mhttpd_ctx.url.s); _ksr_mhttpd_ctx.httpversion.s = (char *)version; _ksr_mhttpd_ctx.httpversion.len = strlen(_ksr_mhttpd_ctx.httpversion.s); - if(*upload_data_size > 0) { - _ksr_mhttpd_ctx.data.s = (char *)upload_data; - _ksr_mhttpd_ctx.data.len = (int)(*upload_data_size); + if(_ksr_mhttpd_ctx.data.s != NULL) { + free(_ksr_mhttpd_ctx.data.s); + } + if(cstream->data.len > 0) { + if(_ksr_mhttpd_ctx.data.s != NULL) { + free(_ksr_mhttpd_ctx.data.s); + } + _ksr_mhttpd_ctx.data = cstream->data; } else { _ksr_mhttpd_ctx.data.s = NULL; _ksr_mhttpd_ctx.data.len = 0; } + free(cstream); _ksr_mhttpd_ctx.cinfo = MHD_get_connection_info( connection, MHD_CONNECTION_INFO_CLIENT_ADDRESS); _ksr_mhttpd_ctx.srcip.s = NULL;
1
0
0
0
git:6.0:f761cad5: microhttpd: create response with MHD_RESPMEM_MUST_COPY flag
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 6.0 Commit: f761cad5b462820af060d6e07410f0dd84c1a52f URL:
https://github.com/kamailio/kamailio/commit/f761cad5b462820af060d6e07410f0d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:16:38+01:00 microhttpd: create response with MHD_RESPMEM_MUST_COPY flag (cherry picked from commit 1569a7b71af26f5b3cb7cb25de7d2425c75f5587) --- Modified: src/modules/microhttpd/microhttpd_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/f761cad5b462820af060d6e07410f0d…
Patch:
https://github.com/kamailio/kamailio/commit/f761cad5b462820af060d6e07410f0d…
--- diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index 9a913b449bb..eaf2820ce68 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -360,7 +360,7 @@ static int ksr_mhttpd_send_reply( } response = MHD_create_response_from_buffer( - sbody->len, sbody->s, MHD_RESPMEM_PERSISTENT); + sbody->len, sbody->s, MHD_RESPMEM_MUST_COPY); if(response == NULL) { LM_ERR("failed to create the response\n"); return -1;
1
0
0
0
git:6.0:813d3ed6: microhttpd: debug message for http response queue
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 6.0 Commit: 813d3ed6a532cc0baa98d27ef9eea579e5ca1688 URL:
https://github.com/kamailio/kamailio/commit/813d3ed6a532cc0baa98d27ef9eea57…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:16:28+01:00 microhttpd: debug message for http response queue (cherry picked from commit 7a793a257b12f946e54bca3d3d92b6c07602fb20) --- Modified: src/modules/microhttpd/microhttpd_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/813d3ed6a532cc0baa98d27ef9eea57…
Patch:
https://github.com/kamailio/kamailio/commit/813d3ed6a532cc0baa98d27ef9eea57…
--- diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index 0ef4b36284e..9a913b449bb 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -372,6 +372,9 @@ static int ksr_mhttpd_send_reply( _ksr_mhttpd_ctx.connection, (unsigned int)rcode, response); MHD_destroy_response(response); + LM_DBG("queue response return: %d (%s)\n", ret, + (ret == MHD_YES) ? "YES" : "XYZ"); + return (ret == MHD_YES) ? 1 : -1; }
1
0
0
0
git:6.0:b3cb2b38: tls: get wss connections as well for selects and vars
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 6.0 Commit: b3cb2b38c5d81c48b0b6315cb7feb99d236d15e3 URL:
https://github.com/kamailio/kamailio/commit/b3cb2b38c5d81c48b0b6315cb7feb99…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:16:15+01:00 tls: get wss connections as well for selects and vars - GH #4167 (cherry picked from commit 3a3856c68cf0cc04385921f8bbec72420cf8f656) --- Modified: src/modules/tls/tls_select.c --- Diff:
https://github.com/kamailio/kamailio/commit/b3cb2b38c5d81c48b0b6315cb7feb99…
Patch:
https://github.com/kamailio/kamailio/commit/b3cb2b38c5d81c48b0b6315cb7feb99…
--- diff --git a/src/modules/tls/tls_select.c b/src/modules/tls/tls_select.c index 7945b23275a..6a2711bd36a 100644 --- a/src/modules/tls/tls_select.c +++ b/src/modules/tls/tls_select.c @@ -129,14 +129,14 @@ struct tcp_connection *get_cur_connection(struct sip_msg *msg) if(_tls_pv_con != 0) return _tls_pv_con; - if(msg->rcv.proto != PROTO_TLS) { + if(msg->rcv.proto != PROTO_TLS && msg->rcv.proto != PROTO_WSS) { ERR("Transport protocol is not TLS (bug in config)\n"); return 0; } c = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, cfg_get(tls, tls_cfg, con_lifetime)); - if(c && c->type != PROTO_TLS) { + if(c && c->type != PROTO_TLS && msg->rcv.proto != PROTO_WSS) { ERR("Connection found but is not TLS\n"); tcpconn_put(c); return 0;
1
0
0
0
git:6.0:0cbf7eed: dialog: enforce second bye towards callee for dlg_bye()
by Daniel-Constantin Mierla
20 Mar '25
20 Mar '25
Module: kamailio Branch: 6.0 Commit: 0cbf7eede6dbd3198664160b77d1b4d0337833b8 URL:
https://github.com/kamailio/kamailio/commit/0cbf7eede6dbd3198664160b77d1b4d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-20T07:16:03+01:00 dialog: enforce second bye towards callee for dlg_bye() - GH #4169 (cherry picked from commit 7de1693573fc08e54db1955095d66c495b2051b9) --- Modified: src/modules/dialog/dlg_req_within.c --- Diff:
https://github.com/kamailio/kamailio/commit/0cbf7eede6dbd3198664160b77d1b4d…
Patch:
https://github.com/kamailio/kamailio/commit/0cbf7eede6dbd3198664160b77d1b4d…
--- diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c index 62b6aea1a9c..7645ebeca37 100644 --- a/src/modules/dialog/dlg_req_within.c +++ b/src/modules/dialog/dlg_req_within.c @@ -376,7 +376,8 @@ static inline int build_extra_hdr( * DLG_CALLER_LEG (0): caller * DLG_CALLEE_LEG (1): callee */ -static inline int send_bye(struct dlg_cell *cell, int dir, str *hdrs) +static inline int send_bye( + struct dlg_cell *cell, int dir, str *hdrs, int enforce) { uac_req_t uac_r; dlg_t *dialog_info; @@ -386,16 +387,15 @@ static inline int send_bye(struct dlg_cell *cell, int dir, str *hdrs) str lhdrs; /* dialog is already in deleted state, nothing to do */ - if(cell->state == DLG_STATE_DELETED) { + if(cell->state == DLG_STATE_DELETED && enforce == 0) { LM_WARN("dlg [%u:%u] with callid %.*s already in deleted state, BYE " "not sent.\n", cell->h_entry, cell->h_id, cell->callid.len, cell->callid.s); - return 0; + return 1; } /* Send Cancel or final response for non-confirmed dialogs */ - if(cell->state != DLG_STATE_CONFIRMED_NA - && cell->state != DLG_STATE_CONFIRMED) { + if(cell->state < DLG_STATE_CONFIRMED_NA) { if(cell->t) { if(dir == DLG_CALLER_LEG) { if(d_tmb.t_reply(cell->t->uas.request, bye_early_code, @@ -843,7 +843,7 @@ int dlg_bye(struct dlg_cell *dlg, str *hdrs, int side) LM_ERR("failed to build dlg headers\n"); return -1; } - ret = send_bye(dlg, side, &all_hdrs); + ret = send_bye(dlg, side, &all_hdrs, 0); pkg_free(all_hdrs.s); dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED); @@ -864,8 +864,10 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs) return -1; } - ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs); - ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs); + ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs, 0); + if(ret == 0) { + ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs, 1); + } pkg_free(all_hdrs.s);
1
0
0
0
git:master:3e9842cb: modules: readme files regenerated - tcpops ... [skip ci]
by Kamailio Dev
19 Mar '25
19 Mar '25
Module: kamailio Branch: master Commit: 3e9842cb1206d39588f7be11a678bbcbc6e3f5d4 URL:
https://github.com/kamailio/kamailio/commit/3e9842cb1206d39588f7be11a678bbc…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2025-03-19T08:01:10+01:00 modules: readme files regenerated - tcpops ... [skip ci] --- Modified: src/modules/tcpops/README --- Diff:
https://github.com/kamailio/kamailio/commit/3e9842cb1206d39588f7be11a678bbc…
Patch:
https://github.com/kamailio/kamailio/commit/3e9842cb1206d39588f7be11a678bbc…
1
0
0
0
git:master:41a48b51: tcpops: docs for tcp_con_alive()
by Daniel-Constantin Mierla
19 Mar '25
19 Mar '25
Module: kamailio Branch: master Commit: 41a48b519c238945b40cf1570e68abaf347fba07 URL:
https://github.com/kamailio/kamailio/commit/41a48b519c238945b40cf1570e68aba…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2025-03-19T07:59:32+01:00 tcpops: docs for tcp_con_alive() --- Modified: src/modules/tcpops/doc/functions.xml --- Diff:
https://github.com/kamailio/kamailio/commit/41a48b519c238945b40cf1570e68aba…
Patch:
https://github.com/kamailio/kamailio/commit/41a48b519c238945b40cf1570e68aba…
--- diff --git a/src/modules/tcpops/doc/functions.xml b/src/modules/tcpops/doc/functions.xml index 85f7369f88b..2ee00a58525 100644 --- a/src/modules/tcpops/doc/functions.xml +++ b/src/modules/tcpops/doc/functions.xml @@ -40,6 +40,36 @@ if(!tcp_conid_alive("$var(conid)")) { xlog("L_ERR", "Connection $conid can no longer be used\n"); } +... + ]]></programlisting> + </example> + </section> + <section id="tcpops.f.tcp_con_alive"> + <title> + <function>tcp_con_alive(hostport)</function> + </title> + <para> + Check the connection based on target host:port. + </para> + <para>Meaning of the parameters is as follows:</para> + <itemizedlist> + <listitem> + <para><emphasis>hostport</emphasis> - target "host:port" address, + the port can be omitted (default to 5060) and the parameter can + contain variables. + </para> + </listitem> + </itemizedlist> + <para>Return values:</para> + <para>1: connection was found</para> + <para>-1: connection was not found or an error occurred</para> + <example> + <title><function>tcp_con_alive</function> usage</title> + <programlisting><![CDATA[ +... + if(!tcp_con_alive("1.2.3.4:5060")) { + xlog("connection not found\n"); + } ... ]]></programlisting> </example>
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200