THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#406 - Crash in websocket module
User who did this - Vitaliy Aleksandrov (Vitaliy)
----------
In the attachment a patch that add reference counting to websocket connections.
Modified version is working right now on my ws gateway without any visible issues.
Can somebody look through it to check if the way i chose and its implementation are right ?
At now it has lots of debug messages and commented code.…
[View More] I'll prepare a clean version after more testing and approving by someone from the kamailio community.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=406#comment1340
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
[View Less]
Module: sip-router
Branch: master
Commit: bbcb7da488b7844ab7c64e800895c60cab0dc601
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bbcb7da…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Fri Mar 7 11:07:11 2014 +0200
lib/ims/ims_getters: Changed cscf_get_called_party_id to cscf_get_public_identity_from_called_party_id
Changed function to get identity from called part id header instead …
[View More]of full header
Fixes clients that attach extra info (e.g. phone-context)
Changed references to this method in ims_charging and ims_registrar_pcscf
---
lib/ims/ims_getters.c | 20 ++++++++++++++++++--
lib/ims/ims_getters.h | 4 ++--
modules/ims_charging/ims_ro.c | 2 +-
modules/ims_charging/mod.c | 2 +-
modules/ims_registrar_pcscf/service_routes.c | 2 +-
5 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/lib/ims/ims_getters.c b/lib/ims/ims_getters.c
index aa37c7d..eb266e8 100644
--- a/lib/ims/ims_getters.c
+++ b/lib/ims/ims_getters.c
@@ -1494,15 +1494,19 @@ int cscf_get_cseq(struct sip_msg *msg,struct hdr_field **hr)
static str s_called_party_id={"P-Called-Party-ID",17};
/**
- * Looks for the P-Called-Party-ID header and extracts its content.
+ * Looks for the P-Called-Party-ID header and extracts the public identity from it
* @param msg - the sip message
* @param hr - ptr to return the found hdr_field
* @returns the P-Called_Party-ID
*/
-str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr)
+str cscf_get_public_identity_from_called_party_id(struct sip_msg *msg,struct hdr_field **hr)
{
str id={0,0};
struct hdr_field *h;
+ int after_semi_colon=0;
+ int len=0;
+ int i=0;
+
if (hr) *hr=0;
if (!msg) return id;
if (parse_headers(msg, HDR_EOH_F, 0)<0) {
@@ -1522,6 +1526,18 @@ str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr)
while(id.len && (id.s[id.len-1]==' ' || id.s[id.len-1]=='\t' || id.s[id.len-1]=='>')){
id.len--;
}
+ //get only text in front of ';' there might not even be a semi-colon
+ //this caters for extra information after the public identity - e.g. phone-context
+ len= id.len;
+ for(i=0; i<len;i++) {
+ if(id.s[i]==';'){
+ //found semi-colon
+ after_semi_colon = 1;
+ }
+ if(after_semi_colon){
+ id.len--;
+ }
+ }
if (hr) *hr = h;
return id;
}
diff --git a/lib/ims/ims_getters.h b/lib/ims/ims_getters.h
index 2217ddc..aeeb591 100644
--- a/lib/ims/ims_getters.h
+++ b/lib/ims/ims_getters.h
@@ -420,12 +420,12 @@ int cscf_add_header_rpl(struct sip_msg *msg, str *hdr);
int cscf_get_cseq(struct sip_msg *msg,struct hdr_field **hr);
/**
- * Looks for the P-Called-Party-ID header and extracts its content.
+ * Looks for the P-Called-Party-ID header and extracts the public identity from it
* @param msg - the sip message
* @param hr - ptr to return the found hdr_field
* @returns the P-Called_Party-ID
*/
-str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr);
+str cscf_get_public_identity_from_called_party_id(struct sip_msg *msg,struct hdr_field **hr);
#endif
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index ae13389..f71dc98 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -954,7 +954,7 @@ int Ro_Send_CCR(struct sip_msg *msg, struct dlg_cell *dlg, int dir, str* charge_
//getting called asserted identity
- if ((called_asserted_identity = cscf_get_called_party_id(msg, &h)).len == 0) {
+ if ((called_asserted_identity = cscf_get_public_identity_from_called_party_id(msg, &h)).len == 0) {
LM_DBG("No P-Called-Identity hdr found. Using request URI for called_asserted_identity");
called_asserted_identity = cscf_get_public_identity_from_requri(msg);
free_called_asserted_identity = 1;
diff --git a/modules/ims_charging/mod.c b/modules/ims_charging/mod.c
index 4fb423f..bbc2708 100644
--- a/modules/ims_charging/mod.c
+++ b/modules/ims_charging/mod.c
@@ -362,7 +362,7 @@ static int w_ro_ccr(struct sip_msg *msg, str* route_name, str* direction, str* c
} else if (dir == RO_TERM_DIRECTION){
//get callee IMPU from called part id - if not present then skip this
- if ((identity = cscf_get_called_party_id(msg, &h)).len == 0) {
+ if ((identity = cscf_get_public_identity_from_called_party_id(msg, &h)).len == 0) {
LM_WARN("No P-Called-Identity hdr found - will not get callbacks if this IMPU is removed to terminate call");
goto send_ccr;
}
diff --git a/modules/ims_registrar_pcscf/service_routes.c b/modules/ims_registrar_pcscf/service_routes.c
index 6360aab..cafed54 100644
--- a/modules/ims_registrar_pcscf/service_routes.c
+++ b/modules/ims_registrar_pcscf/service_routes.c
@@ -481,7 +481,7 @@ int assert_called_identity(struct sip_msg* _m, udomain_t* _d) {
goto error;
}
- called_party_id = cscf_get_called_party_id(req, &h);
+ called_party_id = cscf_get_public_identity_from_called_party_id(req, &h);
if (!called_party_id.len){
[View Less]
Hello,
Kamailio SIP Server v4.1.2 stable release is out.
This is a maintenance release of the latest stable branch, 4.1, that
includes fixes since release of v4.1.1. There is no change to database
schema or configuration language structure that you have to do on
installations of v4.1.x. Deployments running previous v4.x.x versions
are strongly recommended to be upgraded to v4.1.2.
For more details about version 4.1.2 (including links and guidelines to
download the tarball or from GIT …
[View More]repository), visit:
* http://www.kamailio.org/w/2014/03/kamailio-v4-1-2-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
[View Less]
Hello,
Kamailio SIP Server v4.0.6 stable release is out.
This is a maintenance release of the stable branch 4.0, that includes
fixes since release of v4.0.5. There is no change to database schema or
configuration language structure that you have to do on installations of
v4.0.x. Deployments running previous v4.0.x versions are strongly
recommended to be upgraded to v4.0.6.
For more details about version 4.0.6 (including links and guidelines to
download the tarball or from GIT repository)…
[View More], visit:
* http://www.kamailio.org/w/2014/03/kamailio-v4-0-6-released/
Note that 4.0.x is previous stable release series, the latest one is now
4.1.x, with v4.1.2 released today as well.
In addition, 3.3.7 was packaged in order to have it included in the new
APT repository and make transition to newer versions easier for those
still on branch 3.3.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
[View Less]