Hi Daniel,
2009/12/16 Daniel-Constantin Mierla miconda@gmail.com
there are not problems related to code bugs, just that does not seem to use latest version of r-uri. Do you need the original r-uri or the version updated in config?
The reason why we needed the original r-uri instead of the latest is that we had problems in this scenario:
A, B and C are registered in Kamailio which acts as a presence server as well. C is subscribed to the presentity of B. If A calls B, Kamailio performs a location lookup and updates the r-uri (sip:B@XXX.XXX.XXX.XXX). The problem comes when the pua_dialoginfo module tries to send a PUBLISH to this uri and Kamailio is not located in this uri so we get this error:
DBG:pua_dialoginfo:dialog_publish: do not send PUBLISH to external URI sip:B@XXX.XXX.XXX.XXX
So we solved this by taking the original uri (sip:B@mydomain.comsip%3AB@mydomain.com) instead of using the latest.
Maybe we did something wrong and there was a better approach to solve this. What do you think?
Thanks. Best regards,
Santi
BTW, we have noticed that in the dialog-info+xml body the <target uri="..."> is set to the same value as the <identity> for both local and remote elements. Is this correct? or should they be set to the local and remote contact instead?
Maybe Klaus is more familiar with the RFC specs, being the author of the modules. I would need to dig the RFCs.
Cheers, Daniel
Best regards,
Santi
I checked it quickly and the only thing that does not seem ok is how the r-uri is taken in modules/dialog/dlg_handlers.c:
- instead of:
- if(parse_orig_ruri(msg)< 0) {
LM_ERR("bad request or missing RURI\n");
return -1;
- }
should be:
- if(parse_sip_msg_uri(msg)< 0) {
LM_ERR("bad request or missing RURI\n");
return -1;
- }
and instead of:
&(msg->first_line.u.request.uri) );
should be
GET_RURI(msg) );
This ensures that latest R-URI value is taken -- you used to get original r-uri.
If someone can test and report, I will commit quickly.
Cheers, Daniel
On 12/16/09 4:07 PM, Francisco Javier Lizarán Vilches wrote:
-----Mensaje original----- De: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org users-bounces@lists.kamailio.org] En nombre de Daniel-Constantin Mierla Enviado el: miércoles, 16 de diciembre de 2009 10:38 Para: David CC: users@lists.kamailio.org Asunto: Re: [Kamailio-Users] Presence_Dialoginfo versioning
On 12/15/09 4:37 PM, David wrote:
OK, it turns out that the presence application is properly updating subscriptions within a dialog, and creating new subscriptions outside a dialog.
The difficultly is that I am rewriting the To: header, since I used dirty tools, it was dropping ;tag=, so the server thought it was a new dialog and the phone the same dialog.
This should be fixed once r-uri is used instead of To header, right? I am trying to find some time to fix it, maybe with a mod param option.
Cheers, Daniel
Hi Daniel,
Some time ago we posted a patch to try to accomplish what you mention:http://sip-router.org/tracker/index.php?do=details&task_id=18
Hope it helps.
Regards: Francisco
I am testing to make sure that the issue is resolved.
David
On 2009-12-15 04:12, Olle E. Johansson wrote:
15 dec 2009 kl. 09.59 skrev Daniel-Constantin Mierla:
Hello,
On 12/15/09 2:20 AM, kamailio.org@spam.lublink.net wrote:
Alright, I finally found the proper RFC,http://www.rfc-editor.org/rfc/rfc4235.txt
Section 4.1 :
"version: This attribute allows the recipient of dialog information documents to properly order them. Versions start at 0, and increment by one for each new document sent to a subscriber. Versions are scoped within a subscription. Versions MUST be representable using a non-negative 32 bit integer."
Versions are scoped within a subscription, so when a new subscription is started, ( after the 1 hour expiry ), the version should be reset as it is a new subscription and therefore a new scope ?
When the subscription expires, is it renewed or is a new subscription created? Is the scope separate, or is it the same subscription updated?
I think this is another questionable thing about SIP. IMO, it is same subscription if the dialog attributes do not change (call-id, from tag and to tag). But others can argue is it a new subscription. Anyone else on this one?
The proper RFC for generic subscription/notify questions is RFC 3265.
"3.1.1 Subscription Duration SUBSCRIBE requests SHOULD contain an Expires header (defined in SIP [2]). This expires value indicates the duration of the subscription. In order to keep subscriptions effective beyond the duration communicated in the Expires header, subscribers need to refresh subscriptions on a periodic basis using a new SUBSCRIBE message on the same dialog as defined in SIP [2]"
This indicates to me that it's the same subscription as long as you refresh it.
RFC4235 refers to RFC 3265 for general terminology about subscriptions.
/O
Kamailio (OpenSER) - Users mailing listUsers@lists.kamailio.orghttp://lists.kamailio.org/cgi-bin/mailman/listinfo/usershttp://lists.openser...
--
Daniel-Constantin Mierla
Kamailio (OpenSER) - Users mailing listUsers@lists.kamailio.orghttp://lists.kamailio.org/cgi-bin/mailman/listinfo/usershttp://lists.openser...
Kamailio (OpenSER) - Users mailing listUsers@lists.kamailio.orghttp://lists.kamailio.org/cgi-bin/mailman/listinfo/usershttp://lists.openser...
-- Daniel-Constantin Mierla
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
-- Daniel-Constantin Mierla