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 2017
----- 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
389 discussions
Start a n
N
ew thread
git:master:551413f0: kazoo: add json.count transformation
by lazedo
Module: kamailio Branch: master Commit: 551413f0952429c3a360b5ccdeaeac48ea15ff8a URL:
https://github.com/kamailio/kamailio/commit/551413f0952429c3a360b5ccdeaeac4…
Author: lazedo <luis.azedo(a)factorlusitano.com> Committer: lazedo <luis.azedo(a)factorlusitano.com> Date: 2017-06-27T23:01:37+01:00 kazoo: add json.count transformation --- Modified: src/modules/kazoo/kz_json.c Modified: src/modules/kazoo/kz_json.h Modified: src/modules/kazoo/kz_trans.c Modified: src/modules/kazoo/kz_trans.h --- Diff:
https://github.com/kamailio/kamailio/commit/551413f0952429c3a360b5ccdeaeac4…
Patch:
https://github.com/kamailio/kamailio/commit/551413f0952429c3a360b5ccdeaeac4…
7 years, 6 months
1
0
0
0
git:master:d5c60245: kazoo: add $kzRK to accdess routing key of the payload
by lazedo
Module: kamailio Branch: master Commit: d5c602454a9af6ebce852f44dc88c4efa4bf036f URL:
https://github.com/kamailio/kamailio/commit/d5c602454a9af6ebce852f44dc88c4e…
Author: lazedo <luis.azedo(a)factorlusitano.com> Committer: lazedo <luis.azedo(a)factorlusitano.com> Date: 2017-06-27T23:00:43+01:00 kazoo: add $kzRK to accdess routing key of the payload --- Modified: src/modules/kazoo/kazoo.c Modified: src/modules/kazoo/kz_amqp.c Modified: src/modules/kazoo/kz_amqp.h --- Diff:
https://github.com/kamailio/kamailio/commit/d5c602454a9af6ebce852f44dc88c4e…
Patch:
https://github.com/kamailio/kamailio/commit/d5c602454a9af6ebce852f44dc88c4e…
7 years, 6 months
1
0
0
0
[kamailio/kamailio] dispatcher: runtime status access from script (#1166)
by lazedo
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1166
-- Commit Summary -- * dispatcher: runtime status access from script -- File Changes -- M src/modules/dispatcher/dispatch.c (94) M src/modules/dispatcher/dispatch.h (4) M src/modules/dispatcher/dispatcher.c (139) M src/modules/dispatcher/doc/dispatcher_admin.xml (98) -- Patch Links --
https://github.com/kamailio/kamailio/pull/1166.patch
https://github.com/kamailio/kamailio/pull/1166.diff
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1166
7 years, 6 months
2
5
0
0
git:master:a1d64dea: modules: readme files regenerated - path ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: a1d64dea035c1b54c285c4d2d16add414db46795 URL:
https://github.com/kamailio/kamailio/commit/a1d64dea035c1b54c285c4d2d16add4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2017-06-27T16:46:21+02:00 modules: readme files regenerated - path ... [skip ci] --- Modified: src/modules/path/README --- Diff:
https://github.com/kamailio/kamailio/commit/a1d64dea035c1b54c285c4d2d16add4…
Patch:
https://github.com/kamailio/kamailio/commit/a1d64dea035c1b54c285c4d2d16add4…
--- diff --git a/src/modules/path/README b/src/modules/path/README index d3e88f878e..d2e3d69398 100644 --- a/src/modules/path/README +++ b/src/modules/path/README @@ -49,7 +49,7 @@ Richard Fuchs 1.1. Add Supported header 1.2. Set use_received parameter 1.3. Set received_format parameter - 1.4. Set use_received parameter + 1.4. Set enable_r2 parameter 1.5. add_path usage 1.6. add_path(user) usage 1.7. add_path(user, parameters) usage @@ -208,9 +208,9 @@ modparam("path", "received_format", 1) Default value is 0. - Example 1.4. Set use_received parameter + Example 1.4. Set enable_r2 parameter ... -modparam("path", "use_received", 1) +modparam("path", "enable_r2", 1) ... 4. Functions
7 years, 6 months
1
0
0
0
git:master:43f91aa7: path: fixed the name of the parameter in enable_r2 example
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 43f91aa76fd293eb08442a710baa8cb63146e067 URL:
https://github.com/kamailio/kamailio/commit/43f91aa76fd293eb08442a710baa8cb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-06-27T16:43:38+02:00 path: fixed the name of the parameter in enable_r2 example --- Modified: src/modules/path/doc/path_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/43f91aa76fd293eb08442a710baa8cb…
Patch:
https://github.com/kamailio/kamailio/commit/43f91aa76fd293eb08442a710baa8cb…
--- diff --git a/src/modules/path/doc/path_admin.xml b/src/modules/path/doc/path_admin.xml index 4712a09716..a623e55d95 100644 --- a/src/modules/path/doc/path_admin.xml +++ b/src/modules/path/doc/path_admin.xml @@ -192,10 +192,10 @@ modparam("path", "received_format", 1) </emphasis> </para> <example> - <title>Set <varname>use_received</varname> parameter</title> + <title>Set <varname>enable_r2</varname> parameter</title> <programlisting format="linespecific"> ... -modparam("path", "use_received", 1) +modparam("path", "enable_r2", 1) ... </programlisting> </example>
7 years, 6 months
1
0
0
0
git:master:7fc44593: modules: readme files regenerated - path ... [skip ci]
by Kamailio Dev
Module: kamailio Branch: master Commit: 7fc44593b6e2f7b554de7aa2acc9037b6da045e6 URL:
https://github.com/kamailio/kamailio/commit/7fc44593b6e2f7b554de7aa2acc9037…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2017-06-27T16:31:28+02:00 modules: readme files regenerated - path ... [skip ci] --- Modified: src/modules/path/README Modified: src/modules/rr/README --- Diff:
https://github.com/kamailio/kamailio/commit/7fc44593b6e2f7b554de7aa2acc9037…
Patch:
https://github.com/kamailio/kamailio/commit/7fc44593b6e2f7b554de7aa2acc9037…
7 years, 6 months
1
0
0
0
git:master:e1df9208: pv: new variables - $RAu and $RAut
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: e1df92080a631b8c97c110d1e87f74fa1cd5ec9e URL:
https://github.com/kamailio/kamailio/commit/e1df92080a631b8c97c110d1e87f74f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-06-27T16:15:43+02:00 pv: new variables - $RAu and $RAut - $RAu - URI format for local socket where the SIP message was received, without trasport parameter for UDP, using the advertised address if available - $RAut - URI format for local socket where the SIP message was received, always with transport parameter, using the advertised address if available --- Modified: src/modules/pv/pv.c Modified: src/modules/pv/pv_core.c Modified: src/modules/pv/pv_core.h --- Diff:
https://github.com/kamailio/kamailio/commit/e1df92080a631b8c97c110d1e87f74f…
Patch:
https://github.com/kamailio/kamailio/commit/e1df92080a631b8c97c110d1e87f74f…
--- diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c index 4e4eddfecf..c85d2015eb 100644 --- a/src/modules/pv/pv.c +++ b/src/modules/pv/pv.c @@ -387,6 +387,12 @@ static pv_export_t mod_pvs[] = { {{"RAp", (sizeof("RAp")-1)}, /* */ PVT_OTHER, pv_get_rcv_advertised_port, 0, 0, 0, 0, 0}, + {{"RAu", (sizeof("RAu")-1)}, /* */ + PVT_OTHER, pv_get_rcvadv_uri, 0, + 0, 0, 0, 0}, + {{"RAut", (sizeof("RAut")-1)}, /* */ + PVT_OTHER, pv_get_rcvadv_uri_full, 0, + 0, 0, 0, 0}, {{"sf", (sizeof("sf")-1)}, /* */ PVT_OTHER, pv_get_sflags, pv_set_sflags, 0, 0, 0, 0}, diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index b49de912d7..34b03a411f 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -760,7 +760,7 @@ int pv_get_rcvaddr_uri_helper(struct sip_msg *msg, pv_param_t *param, if(msg==NULL) return -1; - if(get_rcv_socket_uri(msg, tmode, &uri)<0) + if(get_rcv_socket_uri(msg, tmode, &uri, 0)<0) return pv_get_null(msg, param, res); if (uri.len + 1 >= pv_get_buffer_size()) @@ -820,6 +820,62 @@ int pv_get_rcv_advertised_port(struct sip_msg *msg, pv_param_t *param, return pv_get_rcvport(msg, param, res); } +int pv_get_rcvadv_uri_helper(struct sip_msg *msg, pv_param_t *param, + int tmode, pv_value_t *res) +{ + str uri; + str sr; + + if(msg==NULL) + return -1; + + if(get_rcv_socket_uri(msg, tmode, &uri, 1)<0) + return pv_get_null(msg, param, res); + + if (uri.len + 1 >= pv_get_buffer_size()) + { + LM_ERR("local buffer size exceeded\n"); + return pv_get_null(msg, param, res); + } + + sr.s = pv_get_buffer(); + strncpy(sr.s, uri.s, uri.len); + sr.len = uri.len; + sr.s[sr.len] = '\0'; + + return pv_get_strval(msg, param, res, &sr); +} + +int pv_get_rcvadv_uri(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + if(msg==NULL) + return -1; + + if(msg->rcv.bind_address!=NULL + && (msg->rcv.bind_address->useinfo.address_str.len > 0 + || msg->rcv.bind_address->useinfo.port_no_str.len > 0)) { + return pv_get_rcvadv_uri_helper(msg, param, 0, res); + } + + return pv_get_rcvaddr_uri_helper(msg, param, 0, res); +} + +int pv_get_rcvadv_uri_full(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + if(msg==NULL) + return -1; + + if(msg->rcv.bind_address!=NULL + && (msg->rcv.bind_address->useinfo.address_str.len > 0 + || msg->rcv.bind_address->useinfo.port_no_str.len > 0)) { + return pv_get_rcvadv_uri_helper(msg, param, 1, res); + } + + return pv_get_rcvaddr_uri_helper(msg, param, 1, res); +} + /** * */ diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h index 81c86f02a8..ac36ef315a 100644 --- a/src/modules/pv/pv_core.h +++ b/src/modules/pv/pv_core.h @@ -157,6 +157,12 @@ int pv_get_rcv_advertised_ip(struct sip_msg *msg, pv_param_t *param, int pv_get_rcv_advertised_port(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); +int pv_get_rcvadv_uri(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res); + +int pv_get_rcvadv_uri_full(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res); + int pv_get_force_sock(struct sip_msg *msg, pv_param_t *param, pv_value_t *res);
7 years, 6 months
1
0
0
0
git:master:aa9129b7: core: parser - get_rcv_socket_uri() with option to use advertised address
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: aa9129b71bb009176571a8cb5bde7221b2f92b75 URL:
https://github.com/kamailio/kamailio/commit/aa9129b71bb009176571a8cb5bde722…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-06-27T16:14:52+02:00 core: parser - get_rcv_socket_uri() with option to use advertised address --- Modified: src/core/parser/msg_parser.c Modified: src/core/parser/msg_parser.h --- Diff:
https://github.com/kamailio/kamailio/commit/aa9129b71bb009176571a8cb5bde722…
Patch:
https://github.com/kamailio/kamailio/commit/aa9129b71bb009176571a8cb5bde722…
--- diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index 84a7ba6ff5..be137652de 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -1105,8 +1105,9 @@ int get_src_uri(sip_msg_t *m, int tmode, str *uri) /** * get received-on-socket ip, port and protocol in SIP URI format * - tmode - 0: short format (transport=udp is not added, being default) + * - atype - 0: listen address; 1: advertised address */ -int get_rcv_socket_uri(sip_msg_t *m, int tmode, str *uri) +int get_rcv_socket_uri(sip_msg_t *m, int tmode, str *uri, int atype) { static char buf[MAX_URI_SIZE]; char* p; @@ -1139,11 +1140,21 @@ int get_rcv_socket_uri(sip_msg_t *m, int tmode, str *uri) } } - ip.s = m->rcv.bind_address->address_str.s; - ip.len = m->rcv.bind_address->address_str.len; + if(atype==0 || m->rcv.bind_address->useinfo.address_str.len<=0) { + ip.s = m->rcv.bind_address->address_str.s; + ip.len = m->rcv.bind_address->address_str.len; + } else { + ip.s = m->rcv.bind_address->useinfo.address_str.s; + ip.len = m->rcv.bind_address->useinfo.address_str.len; + } - port.s = m->rcv.bind_address->port_no_str.s; - port.len = m->rcv.bind_address->port_no_str.len; + if(atype==0|| m->rcv.bind_address->useinfo.port_no_str.len <= 0) { + port.s = m->rcv.bind_address->port_no_str.s; + port.len = m->rcv.bind_address->port_no_str.len; + } else { + port.s = m->rcv.bind_address->useinfo.port_no_str.s; + port.len = m->rcv.bind_address->useinfo.port_no_str.len; + } len = 4 + ip.len + 2*(m->rcv.src_ip.af==AF_INET6)+ 1 + port.len; if (proto.s) { diff --git a/src/core/parser/msg_parser.h b/src/core/parser/msg_parser.h index dd5f498a12..41e6deeb33 100644 --- a/src/core/parser/msg_parser.h +++ b/src/core/parser/msg_parser.h @@ -501,6 +501,6 @@ int get_src_uri(sip_msg_t *m, int tmode, str *uri); /** * get received-on-socket ip, port and protocol in SIP URI format */ -int get_rcv_socket_uri(sip_msg_t *m, int tmode, str *uri); +int get_rcv_socket_uri(sip_msg_t *m, int tmode, str *uri, int atype); #endif
7 years, 6 months
1
0
0
0
git:master:55b5b354: pv: $RAp returns also the int value for advertised port when available
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 55b5b35430ccb7de904f6b1c48ff71e691344b9e URL:
https://github.com/kamailio/kamailio/commit/55b5b35430ccb7de904f6b1c48ff71e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-06-27T16:00:08+02:00 pv: $RAp returns also the int value for advertised port when available --- Modified: src/modules/pv/pv_core.c --- Diff:
https://github.com/kamailio/kamailio/commit/55b5b35430ccb7de904f6b1c48ff71e…
Patch:
https://github.com/kamailio/kamailio/commit/55b5b35430ccb7de904f6b1c48ff71e…
--- diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index 8e0074fca4..b49de912d7 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -797,7 +797,8 @@ int pv_get_rcv_advertised_ip(struct sip_msg *msg, pv_param_t *param, if(msg->rcv.bind_address!=NULL && msg->rcv.bind_address->useinfo.address_str.len > 0) { - return pv_get_strval(msg, param, res, &msg->rcv.bind_address->useinfo.address_str); + return pv_get_strval(msg, param, res, + &msg->rcv.bind_address->useinfo.address_str); } return pv_get_rcvip(msg, param, res); @@ -811,7 +812,9 @@ int pv_get_rcv_advertised_port(struct sip_msg *msg, pv_param_t *param, if(msg->rcv.bind_address!=NULL && msg->rcv.bind_address->useinfo.port_no_str.len > 0) { - return pv_get_strval(msg, param, res, &msg->rcv.bind_address->useinfo.port_no_str); + return pv_get_intstrval(msg, param, res, + (int)msg->rcv.bind_address->useinfo.port_no, + &msg->rcv.bind_address->useinfo.port_no_str); } return pv_get_rcvport(msg, param, res);
7 years, 6 months
1
0
0
0
git:master:adeab30b: pv: new variables - $Ru and $Rut
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: adeab30b6bd26b8c4eddd4eb070cb11417401521 URL:
https://github.com/kamailio/kamailio/commit/adeab30b6bd26b8c4eddd4eb070cb11…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-06-27T15:54:55+02:00 pv: new variables - $Ru and $Rut - $Ru - URI format for local socket where the SIP message was received, without trasport parameter for UDP - $Rut - URI format for local socket where the SIP message was received, always with transport parameter --- Modified: src/modules/pv/pv.c Modified: src/modules/pv/pv_core.c Modified: src/modules/pv/pv_core.h --- Diff:
https://github.com/kamailio/kamailio/commit/adeab30b6bd26b8c4eddd4eb070cb11…
Patch:
https://github.com/kamailio/kamailio/commit/adeab30b6bd26b8c4eddd4eb070cb11…
--- diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c index 483faa2d19..4e4eddfecf 100644 --- a/src/modules/pv/pv.c +++ b/src/modules/pv/pv.c @@ -375,6 +375,12 @@ static pv_export_t mod_pvs[] = { {{"Rp", (sizeof("Rp")-1)}, /* */ PVT_OTHER, pv_get_rcvport, 0, 0, 0, 0, 0}, + {{"Ru", (sizeof("Ru")-1)}, /* */ + PVT_OTHER, pv_get_rcvaddr_uri, 0, + 0, 0, 0, 0}, + {{"Rut", (sizeof("Rut")-1)}, /* */ + PVT_OTHER, pv_get_rcvaddr_uri_full, 0, + 0, 0, 0, 0}, {{"RAi", (sizeof("RAi")-1)}, /* */ PVT_OTHER, pv_get_rcv_advertised_ip, 0, 0, 0, 0, 0}, @@ -408,12 +414,12 @@ static pv_export_t mod_pvs[] = { {{"su", (sizeof("su")-1)}, /* */ PVT_OTHER, pv_get_srcaddr_uri, 0, 0, 0, 0, 0}, - {{"td", (sizeof("td")-1)}, /* */ - PVT_OTHER, pv_get_to_attr, pv_set_to_domain, - 0, 0, pv_init_iname, 3}, {{"sut", (sizeof("sut")-1)}, /* */ PVT_OTHER, pv_get_srcaddr_uri_full, 0, 0, 0, 0, 0}, + {{"td", (sizeof("td")-1)}, /* */ + PVT_OTHER, pv_get_to_attr, pv_set_to_domain, + 0, 0, pv_init_iname, 3}, {{"to.domain", (sizeof("to.domain")-1)}, /* */ PVT_OTHER, pv_get_to_attr, pv_set_to_domain, 0, 0, pv_init_iname, 3}, diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index acd9105cb2..8e0074fca4 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -751,6 +751,44 @@ int pv_get_rcvport(struct sip_msg *msg, pv_param_t *param, &msg->rcv.bind_address->port_no_str); } +int pv_get_rcvaddr_uri_helper(struct sip_msg *msg, pv_param_t *param, + int tmode, pv_value_t *res) +{ + str uri; + str sr; + + if(msg==NULL) + return -1; + + if(get_rcv_socket_uri(msg, tmode, &uri)<0) + return pv_get_null(msg, param, res); + + if (uri.len + 1 >= pv_get_buffer_size()) + { + LM_ERR("local buffer size exceeded\n"); + return pv_get_null(msg, param, res); + } + + sr.s = pv_get_buffer(); + strncpy(sr.s, uri.s, uri.len); + sr.len = uri.len; + sr.s[sr.len] = '\0'; + + return pv_get_strval(msg, param, res, &sr); +} + +int pv_get_rcvaddr_uri(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + return pv_get_rcvaddr_uri_helper(msg, param, 0, res); +} + +int pv_get_rcvaddr_uri_full(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res) +{ + return pv_get_rcvaddr_uri_helper(msg, param, 1, res); +} + int pv_get_rcv_advertised_ip(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h index 905fc89db5..81c86f02a8 100644 --- a/src/modules/pv/pv_core.h +++ b/src/modules/pv/pv_core.h @@ -145,6 +145,12 @@ int pv_get_rcvip(struct sip_msg *msg, pv_param_t *param, int pv_get_rcvport(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); +int pv_get_rcvaddr_uri(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res); + +int pv_get_rcvaddr_uri_full(struct sip_msg *msg, pv_param_t *param, + pv_value_t *res); + int pv_get_rcv_advertised_ip(struct sip_msg *msg, pv_param_t *param, pv_value_t *res);
7 years, 6 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
39
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
Results per page:
10
25
50
100
200