THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#122 - Kamailio 3.1.3 crash
User who did this - Timo Reimann (tr)
----------
There's a problem with calling dlg_manage() on INVITE messages and spiral detection: It doesn't trigger spiral detection at the moment but creates another dialog right away. Luckily, I have already created a patch which I plan to integrate into the master branch ASAP. I simply haven't found the time to do it yet. As of now, the spiral detection code is only effective when you auto-track dialogs and let the dialog machinery try to match a new INVITE to a possibly already existing dialog.
If spirals are not involved or you are dealing with in-dialog messages, however, dlg_manage() should work fine and *not* create a new dialog. My understanding was that you are processing a BYE transaction so if you call dlg_manage() it should work in that case. Let me know if I got you wrong about how and when you use dialog's exported functions (an excerpt from your configuration would certainly be helpful).
By the way, dlg_get() doesn't care about spirals. It just grabs the first dialog matching the given dialog ID (Call ID, To-tag, From-tag) and proclaims that to be the current dialog, so you need to make sure there's no ambiguity in the first place setting "detect_spirals" to 1 and having the dialog being tracked properly. Honestly, I think the dialog interface and the way messages are mapped to dialogs needs to be overhauled significantly. I'd like to see calls to $dlg() work every time and without any dependence on previously called methods (like dlg_get() or dlg_manage()) regardless of whether a call is already being tracked or not.
This is certainly possible (IMHO) but needs time. Give me a time machine and I'll do it for you in a blink of an eye. :)
Cheers,
--Timo
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=122#comment198
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.
Module: sip-router
Branch: master
Commit: d93dc272bdc9a7a8b74a57712965b3ef5b562060
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d93dc27…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Apr 7 12:03:32 2011 +0200
rls(k): send 200ok for NOTIFY with subscription state termintated
- when rls module sends an un-SUBSCRIBE (expires=0), then the dialog
structure is removed and the NOTIFY arriving later to confirm the
termination of subscription does not find any record, resulting in no
reply
- the patch detects the subscribe-state terminated in NOTIFY requests
and sends back 200ok
- reported by Peter Dunkley
(cherry picked from commit cdee458b2ec4296cb847dd6e531285c0ac64dd80)
---
modules_k/rls/resource_notify.c | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/modules_k/rls/resource_notify.c b/modules_k/rls/resource_notify.c
index d41f3ca..0caf7cb 100644
--- a/modules_k/rls/resource_notify.c
+++ b/modules_k/rls/resource_notify.c
@@ -240,16 +240,6 @@ int rls_handle_notify(struct sip_msg* msg, char* c1, char* c2)
LM_ERR("unrecognized event package\n");
goto error;
}
- if(pua_get_record_id(&dialog, &res_id)< 0) // verify if within a stored dialog
- {
- LM_ERR("occured when trying to get record id\n");
- goto error;
- }
- if(res_id== 0)
- {
- LM_ERR("record not found\n");
- goto error;
- }
/* extract the subscription state */
hdr = msg->headers;
@@ -276,6 +266,24 @@ int rls_handle_notify(struct sip_msg* msg, char* c1, char* c2)
LM_ERR("while parsing 'Subscription-State' header\n");
goto error;
}
+ if(pua_get_record_id(&dialog, &res_id)< 0) // verify if within a stored dialog
+ {
+ LM_ERR("occured when trying to get record id\n");
+ goto error;
+ }
+ if(res_id==0)
+ {
+ LM_DBG("presence dialog record not found\n");
+ /* if it is a NOTIFY for a terminated SUBSCRIBE dialog in RLS, then
+ * the module might not have the dialog structure anymore
+ * - just send 200ok, it is harmless
+ */
+ if(auth_flag==TERMINATED_STATE)
+ goto done;
+ LM_ERR("no presence dialog record for non-TERMINATED state\n");
+ goto error;
+ }
+
if(msg->content_type== NULL || msg->content_type->body.s== NULL)
{
LM_DBG("cannot find content type header header\n");
@@ -408,9 +416,11 @@ done:
goto error;
}
- pkg_free(res_id->s);
- pkg_free(res_id);
-
+ if(res_id!=NULL)
+ {
+ pkg_free(res_id->s);
+ pkg_free(res_id);
+ }
return 1;
error:
Module: sip-router
Branch: 3.1
Commit: cdee458b2ec4296cb847dd6e531285c0ac64dd80
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cdee458…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Apr 7 12:03:32 2011 +0200
rls(k): send 200ok for NOTIFY with subscription state termintated
- when rls module sends an un-SUBSCRIBE (expires=0), then the dialog
structure is removed and the NOTIFY arriving later to confirm the
termination of subscription does not find any record, resulting in no
reply
- the patch detects the subscribe-state terminated in NOTIFY requests
and sends back 200ok
- reported by Peter Dunkley
---
modules_k/rls/resource_notify.c | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/modules_k/rls/resource_notify.c b/modules_k/rls/resource_notify.c
index d41f3ca..0caf7cb 100644
--- a/modules_k/rls/resource_notify.c
+++ b/modules_k/rls/resource_notify.c
@@ -240,16 +240,6 @@ int rls_handle_notify(struct sip_msg* msg, char* c1, char* c2)
LM_ERR("unrecognized event package\n");
goto error;
}
- if(pua_get_record_id(&dialog, &res_id)< 0) // verify if within a stored dialog
- {
- LM_ERR("occured when trying to get record id\n");
- goto error;
- }
- if(res_id== 0)
- {
- LM_ERR("record not found\n");
- goto error;
- }
/* extract the subscription state */
hdr = msg->headers;
@@ -276,6 +266,24 @@ int rls_handle_notify(struct sip_msg* msg, char* c1, char* c2)
LM_ERR("while parsing 'Subscription-State' header\n");
goto error;
}
+ if(pua_get_record_id(&dialog, &res_id)< 0) // verify if within a stored dialog
+ {
+ LM_ERR("occured when trying to get record id\n");
+ goto error;
+ }
+ if(res_id==0)
+ {
+ LM_DBG("presence dialog record not found\n");
+ /* if it is a NOTIFY for a terminated SUBSCRIBE dialog in RLS, then
+ * the module might not have the dialog structure anymore
+ * - just send 200ok, it is harmless
+ */
+ if(auth_flag==TERMINATED_STATE)
+ goto done;
+ LM_ERR("no presence dialog record for non-TERMINATED state\n");
+ goto error;
+ }
+
if(msg->content_type== NULL || msg->content_type->body.s== NULL)
{
LM_DBG("cannot find content type header header\n");
@@ -408,9 +416,11 @@ done:
goto error;
}
- pkg_free(res_id->s);
- pkg_free(res_id);
-
+ if(res_id!=NULL)
+ {
+ pkg_free(res_id->s);
+ pkg_free(res_id);
+ }
return 1;
error:
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#122 - Kamailio 3.1.3 crash
User who did this - Jasmin Schnatterbeck (jasmin)
----------
okay, some tests later :-)
dlg_manage() creates a new dialog, so no access to the variables of the "real" dialog
another idea: setting $du to the server itself, then the BYE request should be processed by normal routes again. Problem is, that the did= route param is not available, so dialog can not be identified. Why not use callid, ftag, ttag? see below
dlg_get() works, but regarding SIP spirals unknown behaviour. That seems to be an generic problem, because when spirals are being used and detect_spirals is 0, a single dialog can not be identified with callid, ftag and totag only.
May that's the reason for [[ http://kamailio.org/docs/modules/stable/modules_k/dialog.html#id2966526|dlg… to use h_entry and h_id for dialog identification instead of callid, ftag and ttag.
So if dialog is not loaded automatically in event-route, it would be necessary to access the mi params and to have a function do get a dialog based on h_entry and h_id.
I think that loading dialog in event-route automatically is a straightforward solution, because that is done with "normal" requests (received via socket), too.
This should be possible, if h_id and h_entry is available, which is the case for dlg_end_dlg...
Jasmin
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=122#comment197
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.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#122 - Kamailio 3.1.3 crash
User who did this - Timo Reimann (tr)
----------
Try calling dlg_manage() before you access any dialog variables.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=122#comment196
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.
Hello,
recently the demand in jobs and projects related to kamailio seemed to
increase. I can just say that I am very happy with that.
While announcing on the mailing lists is ok, I think we should try to
make the process better and more productive, i.e., easier to advertise
by publishers and easier to read for those interesting. For that, imo,
we need a web page where someone can post such announcements and the
others can read it.
Since I had this idea in mind for some while, I searched for a dokuwiki
plugin that could help, so we can reuse our wiki system. I found
bureaucracy plugin, but does not seem to be ready for latest dokuwiki
version according to its page:
http://www.dokuwiki.org/plugin:bureaucracy
But maybe it just works, I should try it instead of waiting, anyhow
spare time is not my friend these days...
Alternatives would be:
- a wordpress plugin - haven't searched for one yet, but there are tons
of plugins for WP, maybe one will fit the needs
- another web application designed for such purposes
My question to you is whether you can recommend a solution which we can
evaluate. Ideally (or better said, as many characteristics to be met as
possible), the system should be able to:
- allow people to post announcements for jobs and projects (with or
without prior registration, but with spam prevention - e.g., captcha)
- allow to publish details about the job/projects, contact addresses,
validity period
- allow to invalidate an announcement when the position/project is taken
- send an email notification when the announcement is done first time,
with a link to the web page of the announcement, so we can send it one
to a particular mailing list
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
Job offer:
Interested in working with one of the biggest Voice over IP networks in
europe? We're hiring and have one additional IT operation position open in
our team in Karlsruhe, Germany at the moment. You would be responsible in
a team of motivated system administrators for the operation and maintenance
of the radius and CPE auto-provisioning services at 1&1. Furthermore you
would support our on-call service for all the services operated from the team,
including VoIP.
A solid understanding of german is necessary for the job, for more informations
(additional requirements, how to apply..) please refer to the opening on the
job web page. Of course please feel free to contact me per mail as well.
http://www.united-internet.de/JobsJobDetail?__sendingdata=1&JobDetails.jobI…
Best regards,
Henning Westerholt
--
Henning Westerholt - Head of IT Operations Internet Access & Communications
1&1 Internet AG, Brauerstraße 48, 76135 Karlsruhe, Germany
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#122 - Kamailio 3.1.3 crash
User who did this - Jasmin Schnatterbeck (jasmin)
----------
dlg_get tries to get the dialog based on callid, ftag, ttag.
We also have spiraled calls through the proxies (detect_spirals=0).
How does dlg_get behave in that case?
Jasmin
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=122#comment195
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.