[OpenSIPS-Users] double reply by presence [and missing subscriptions]

Anca Vamanu anca at opensips.org
Tue Sep 21 12:10:35 CEST 2010


Hi Kennard,

Thank you for the through testing and analysis.
The to_tag is not created in presence module, this is why it you didn't 
find it :). It is created either in sl or tm module depending whether 
you use statefull or stateless processing. The control flow is as follows :
- presence/subscribe.c +116 (send_2XX_reply)  -> signaling/signaling.c 
+156 (sig_send_reply_mod)  and then depending if a transaction was 
created from the script or not it gets to:
-   tm/t_reply.c +440 (_reply) and it uses the tag from tm_tag which is 
constructed in the function tm_init_tags ( tm/t_reply.c +182).
-   sl/sl_funcs.c +142 (sl_send_reply_helper) that uses the sl_tag which 
is initiated with the same function init_tags (sl/sl_funcs.c +72).

Regards,
Anca



On 09/13/2010 09:08 PM, Kennard_White at logitech.com wrote:
>
> Hi Anca,
>
> I picked up your commit and I'm testing now. Thanks for the very fast 
> response!
>
> I'm tracing down another issue (see below if interested) and I'm 
> looking for the code that generates the to tag upon an initial 
> subscription. I cannot find it. Can anyone point me to it?
>
> I'm getting messages:
> Sep 13 11:06:28 sdc01sip01 /var/run/openser/opensips-pres[13733]: 
> ERROR:presence:get_stored_info: record not found in hash_table
> Sep 13 11:06:28 sdc01sip01 /var/run/openser/opensips-pres[13733]: 
> ERROR:presence:handle_subscribe: getting stored info
>
> And also:
> Sep 13 11:02:30 sdc01sip01 /var/run/openser/opensips-pres[13748]: 
> ERROR:db_mysql:db_mysql_do_prepared_query: driver error: Duplicate 
> entry 'XXXXXXXXXXXXXXXXX-NzExMWUzODdmZDc1YTFiNTFlNGU3ZWQ' for key 
> 'active_watchers_idx'
>
> I think the two might be related, and I want to understand how to 
> to-tag is generated since it is a key to both the db and hash look ups.
>
> Thanks,
> Kennard
>
> Inactive hide details for Kennard_White---09/10/2010 09:44:43 AM---Hi, 
> Running opensips HEAD code, it seems that in at least 
> onKennard_White---09/10/2010 09:44:43 AM---Hi, Running opensips HEAD 
> code, it seems that in at least one case the presence
>
> From: Kennard_White at logitech.com
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Date: 09/10/2010 09:44 AM
> Subject: [OpenSIPS-Users] double reply by presence
> Sent by: users-bounces at lists.opensips.org
>
> ------------------------------------------------------------------------
>
>
>
> Hi,
>
> Running opensips HEAD code, it seems that in at least one case the 
> presence PUBLISH handling code attempts to generate two replies. 
> Please see log trace below.
>
> In this particular case, I think presence_xml needs to return some 
> flag to let the core presence module know that it has already replied. 
> Or perhaps the core presence code could query sig/tm to see if a reply 
> has already been sent.
>
> I'm happy to make the changes and submit patch if that is helpful, but 
> please let me know which direction I should take so that the patch 
> will be accepted.
>
> One other minor request: would be helpful if the "bad body format" 
> message could also log the from address (or perhaps the callid -- 
> something to make to traceable).
>
> Thanks,
> Kennard
>
>
> Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
> ERROR:presence_xml:xml_publ_handl: bad body format
> Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
> ERROR:presence:handle_publish: in event specific publish handling
> Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
> ERROR:tm:_reply_light: failed to generate 500 reply when a final 415 
> was sent out
> Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
> ERROR:signaling:sig_send_reply_mod: failed to send reply with tm module
> Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
> ERROR:presence:send_error_reply: sending 500 Server Internal Error reply
> Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]: 
> ERROR:presence:handle_publish: failed to send error reply 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>    


-- 
Anca Vamanu
www.voice-system.ro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100921/f9d59dd3/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20100921/f9d59dd3/attachment.gif 


More information about the Users mailing list