Change in ims_isc/checker.c and ims_isc/checker.h:
add to isc_match two new flags include_register_request
and include_register_response in addition to service_info
Both info are retrieved from HSS during SAR/SAA
Change in ims_isc/third_party_reg.c/.h:
Add REGISTER Request or REGISTER Response or Service Info
to the body of the REGISTER message that is sent to the
AS, if it is requested by content of HSS (SAR/SAA)
Change in ims_registrar_scscf/userdata_parser.c and
ims_usrloc_scscf/usrloc.h:
Parse the additional flags, when they are received from HSS
and store in the subscription.
Conflicts:
src/modules/ims_isc/third_party_reg.c
src/modules/ims_rdn/userdata_parser.c
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
---> apologies, we did this commit long ago, when we did not know the rules of the project
main changes are in ims_isc, two small changes in ims_registrar_scscf and ims_usrloc_scscf
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally based on a local branch derived from 5.1.0
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
The feature is a small add-on to third party registration in S-CSCF
The feature assumes two new flags in HSS database, where additional to the "Service Info XML" an "insertRegisterRequest" flag or an "insertRegisterRepsonse" flag can be set. These flags are sent with the SAR/SAA exchange to the S-CSCF, where the new feature does a prioritization:
If Service Info present -> add service info to body of 3rd Party REGISTER Request
else if insertRegisterRequest -> add original REGISTER request to body of 3rd Party REGISTER request
else if insertRegisterResponse -> add original REGISTER response to body of 3rd Party REGISTER request
else -> add no body to 3rd Party REGISTER request.
Multipart Body is not supported.
More info about the insertRegisterRequest and insertRegisterResponse flags can be found in applicable 3GPP standards.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1923
-- Commit Summary --
* ims_isc: add-on for third-party registration
-- File Changes --
M src/modules/ims_isc/checker.c (2)
M src/modules/ims_isc/checker.h (2)
M src/modules/ims_isc/third_party_reg.c (106)
M src/modules/ims_isc/third_party_reg.h (18)
M src/modules/ims_registrar_scscf/userdata_parser.c (35)
M src/modules/ims_usrloc_scscf/usrloc.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1923.patchhttps://github.com/kamailio/kamailio/pull/1923.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/1923
Module: kamailio
Branch: master
Commit: 3feab77f597284ddc8b6b87d0da0f47a0979e54d
URL: https://github.com/kamailio/kamailio/commit/3feab77f597284ddc8b6b87d0da0f47…
Author: Christoph Valentin <Christoph.Valentin(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-04-09T21:35:41+02:00
ims_usrloc_scscf: add-on for third-party registration
- The feature is a add-on to third party registration in S-CSCF
- related to the the change in ims_isc module
---
Modified: src/modules/ims_usrloc_scscf/usrloc.h
---
Diff: https://github.com/kamailio/kamailio/commit/3feab77f597284ddc8b6b87d0da0f47…
Patch: https://github.com/kamailio/kamailio/commit/3feab77f597284ddc8b6b87d0da0f47…
---
diff --git a/src/modules/ims_usrloc_scscf/usrloc.h b/src/modules/ims_usrloc_scscf/usrloc.h
index 4f124fdf7c..0db0f02063 100644
--- a/src/modules/ims_usrloc_scscf/usrloc.h
+++ b/src/modules/ims_usrloc_scscf/usrloc.h
@@ -201,6 +201,8 @@ typedef struct _ims_application_server {
str server_name; /**< SIP URL of the app server */
char default_handling; /**< enum SESSION_CONTINUED SESSION_TERMINATED 0..1 */
str service_info; /**< optional info to be sent to AS 0..1 */
+ int include_register_request;
+ int include_register_response;
} ims_application_server;
/** Public Identity Structure */
Module: kamailio
Branch: master
Commit: 99b2cfaf4151968a62099880928563a64ccdeddc
URL: https://github.com/kamailio/kamailio/commit/99b2cfaf4151968a62099880928563a…
Author: Christoph Valentin <Christoph.Valentin(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-04-09T21:31:19+02:00
ims_isc: add-on for third-party registration
- The feature is a add-on to third party registration in S-CSCF
- The feature assumes two new flags in HSS database, where additional to the
"Service Info XML" an "insertRegisterRequest" flag or an "insertRegisterRepsonse"
flag can be set. These flags are sent with the SAR/SAA exchange to the S-CSCF,
where the new feature does a prioritization:
If Service Info present -> add service info to body of 3rd Party REGISTER Request
else if insertRegisterRequest -> add original REGISTER request to body of
3rd Party REGISTER request
else if insertRegisterResponse -> add original REGISTER response to body of
3rd Party REGISTER request
else -> add no body to 3rd Party REGISTER request.
- Multipart Body is not supported.
- More info about the insertRegisterRequest and insertRegisterResponse flags
can be found in applicable 3GPP standards.
---
Modified: src/modules/ims_isc/checker.c
Modified: src/modules/ims_isc/checker.h
Modified: src/modules/ims_isc/doc/ims_isc_admin.xml
Modified: src/modules/ims_isc/third_party_reg.c
Modified: src/modules/ims_isc/third_party_reg.h
---
Diff: https://github.com/kamailio/kamailio/commit/99b2cfaf4151968a62099880928563a…
Patch: https://github.com/kamailio/kamailio/commit/99b2cfaf4151968a62099880928563a…
Module: kamailio
Branch: master
Commit: 7a9776151fd246a7d98a7cebe85ac2babb2da9b3
URL: https://github.com/kamailio/kamailio/commit/7a9776151fd246a7d98a7cebe85ac2b…
Author: iionita <ionut-razvan.ionita(a)1and1.ro>
Committer: Henning Westerholt <henningw(a)users.noreply.github.com>
Date: 2019-04-09T21:25:53+02:00
siptrace: remove bogus comments
---
Modified: src/modules/siptrace/doc/siptrace_admin.xml
Modified: src/modules/siptrace/siptrace.c
Modified: src/modules/siptrace/siptrace_send.c
---
Diff: https://github.com/kamailio/kamailio/commit/7a9776151fd246a7d98a7cebe85ac2b…
Patch: https://github.com/kamailio/kamailio/commit/7a9776151fd246a7d98a7cebe85ac2b…
---
diff --git a/src/modules/siptrace/doc/siptrace_admin.xml b/src/modules/siptrace/doc/siptrace_admin.xml
index 83449ee31f..288824ba93 100644
--- a/src/modules/siptrace/doc/siptrace_admin.xml
+++ b/src/modules/siptrace/doc/siptrace_admin.xml
@@ -19,7 +19,7 @@
The SIPtrace module offer a possibility to store incoming and outgoing SIP
messages in a database and/or duplicate to the capturing server (using <acronym>HEP</acronym>,
the Homer encapsulation protocol, or plain SIP mode). Since version 5.4 new levels of tracing
- are available. Transactions and dialogs can be traced. Trace flag is now useless.
+ are available. Transactions and dialogs can be traced.
</para>
<para>
There are multiple ways of storing information:
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index fae818ec43..7bfa5a60ee 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -750,6 +750,10 @@ static int fixup_siptrace(void **param, int param_no)
}
*param = pkg_malloc(sizeof(trace_type));
+ if (*param == NULL) {
+ LM_ERR("no more pkg memory!\n");
+ return -1;
+ }
memcpy(*param, &trace_type, sizeof(trace_type));
}
@@ -758,12 +762,10 @@ static int fixup_siptrace(void **param, int param_no)
/**
- * TODO TODO TODO:
*
* parse_siptrace_uri (to replace siptrace_fixup and ki_sip_trace_dst_cid beginning)
* parse_siptrace_type
*
- *
*/
static int parse_siptrace_uri(str* duri, dest_info_t* dst)
@@ -1535,7 +1537,6 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps)
if (info->uriState == STRACE_RAW_URI) {
LM_BUG("uriState must be either UNUSED or PARSED here! must be a bug! Message won't be traced!\n");
- abort();
return;
}
diff --git a/src/modules/siptrace/siptrace_send.c b/src/modules/siptrace/siptrace_send.c
index c8b2051385..aeaef830ca 100644
--- a/src/modules/siptrace/siptrace_send.c
+++ b/src/modules/siptrace/siptrace_send.c
@@ -268,14 +268,13 @@ int trace_send_duplicate(char *buf, int len, struct dest_info *dst2)
/* either modparam dup_uri or siptrace param dst2 */
if((dup_uri_str.s == 0 || dup_uri == NULL) && (dst2 == NULL)) {
- LM_INFO("XXX: here s where we've got problems!\n");
+ LM_WARN("Neither dup_uri modparam or siptrace destination uri param used!\n");
return 0;
}
init_dest_info(&dst);
if(!dst2) {
- LM_INFO("XXX: using default dup uri!\n");
/* create a temporary proxy from dst param */
dst.proto = PROTO_UDP;
p = mk_proxy(&dup_uri->host,
Module: kamailio
Branch: master
Commit: 66d17d5e55bf25f4cd57c6a957e8db89ba889c41
URL: https://github.com/kamailio/kamailio/commit/66d17d5e55bf25f4cd57c6a957e8db8…
Author: iionita <ionut-razvan.ionita(a)1and1.ro>
Committer: Henning Westerholt <henningw(a)users.noreply.github.com>
Date: 2019-04-09T21:25:53+02:00
siptrace: when saving into dialog use local stored uri instead of global one
The local one is either the parameter if set or the global one if not.
---
Modified: src/modules/siptrace/siptrace.c
---
Diff: https://github.com/kamailio/kamailio/commit/66d17d5e55bf25f4cd57c6a957e8db8…
Patch: https://github.com/kamailio/kamailio/commit/66d17d5e55bf25f4cd57c6a957e8db8…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 94167c32e0..fae818ec43 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -969,7 +969,7 @@ static int w_sip_trace3(sip_msg_t *msg, char *dest, char *correlation_id, char *
info->correlation_id = correlation_id_str;
if (dest) {
info->uriState = STRACE_RAW_URI;
- info->u.dup_uri = dup_uri_str;
+ info->u.dup_uri = dup_uri_param_str;
} else {
info->uriState = STRACE_UNUSED_URI;
}
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Siptrace module has two different tracing concepts which do mostly the same thing. It has sip_trace function and it has trace_flag parameter which traces messages in a transaction. This pull request aims to have a single point of trace activation, that is when the user calls sip_trace() function from the script. Moreover, it adds 3 levels of tracing: message, transaction and dialog level tracing. This option is added as a parameter to sip_trace(), therefore the user can now summon sip_trace(duri, correlation_id, "m/t/d") where "m" stands for message, "t" for transaction and "d" for dialog.
The patch has been tested both locally and in our company's test system. Locally I've tested it using a few scenarios generated using sipp: successful call, negative reply(491 answer - hop-by-hop ACK), UAC CANCEL and dual bye scenario generated by Kamailio(dialog timeout). The only issue with current patch is it doesn't trace internally generated BYEs that is because they are only a buffer in Kamailio, not a parsed SIP message, therefore, after a few days of searching for solutions I didn't find any valid one. Parsing a SIP message for tracing didn't seem worth the processing time to me, but of course it can be added in the future.
Looking forward to your opinion or suggestions regarding the current patch.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1912
-- Commit Summary --
* siptrace: add basic transaction and dialog level tracing
* siptrace: trace negative ACKs
* siptrace: check if a request is set to avoid local transaction crash
* siptrace: Add code to trace incoming CANCEL transcations
* siptrace: Minor code fixes; remove useless error logs
* siptrace: store sip_trace destination parameter for the entire dialog
* siptrace: remove unused trace flag
* siptrace: update README
-- File Changes --
M src/core/parser/msg_parser.h (1)
M src/modules/siptrace/README (562)
M src/modules/siptrace/doc/siptrace_admin.xml (33)
M src/modules/siptrace/siptrace.c (864)
M src/modules/siptrace/siptrace_data.h (14)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1912.patchhttps://github.com/kamailio/kamailio/pull/1912.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/1912