<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Kennard,<br>
<br>
Thank you for the through testing and analysis. <br>
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 :<br>
- 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:<br>
- 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).<br>
- 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).<br>
<br>
Regards,<br>
Anca<br>
<br>
<br>
<br>
On 09/13/2010 09:08 PM, <a class="moz-txt-link-abbreviated" href="mailto:Kennard_White@logitech.com">Kennard_White@logitech.com</a> wrote:
<blockquote
cite="mid:OF8480129A.2A9EA4E5-ON8825779D.0062BCA2-8825779D.0063A7E5@logitech.com"
type="cite">
<p>Hi Anca,<br>
<br>
I picked up your commit and I'm testing now. Thanks for the very fast
response!<br>
<br>
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?<br>
<br>
I'm getting messages: <br>
Sep 13 11:06:28 sdc01sip01 /var/run/openser/opensips-pres[13733]:
ERROR:presence:get_stored_info: record not found in hash_table<br>
Sep 13 11:06:28 sdc01sip01 /var/run/openser/opensips-pres[13733]:
ERROR:presence:handle_subscribe: getting stored info<br>
<br>
And also:<br>
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'<br>
<br>
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.<br>
<br>
Thanks,<br>
Kennard<br>
<br>
<img src="cid:part1.07080506.05020102@opensips.org"
alt="Inactive hide details for Kennard_White---09/10/2010 09:44:43 AM---Hi, Running opensips HEAD code, it seems that in at least on"
height="16" width="16" border="0"><font color="#424282">Kennard_White---09/10/2010
09:44:43 AM---Hi, Running opensips HEAD code, it seems that in at least
one case the presence</font><br>
<br>
<font size="2" color="#5f5f5f">From: </font><font size="2"><a class="moz-txt-link-abbreviated" href="mailto:Kennard_White@logitech.com">Kennard_White@logitech.com</a></font><br>
<font size="2" color="#5f5f5f">To: </font><font size="2">OpenSIPS
users mailling list <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a></font><br>
<font size="2" color="#5f5f5f">Date: </font><font size="2">09/10/2010
09:44 AM</font><br>
<font size="2" color="#5f5f5f">Subject: </font><font size="2">[OpenSIPS-Users]
double reply by presence</font><br>
<font size="2" color="#5f5f5f">Sent by: </font><font size="2"><a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a></font><br>
</p>
<hr style="color: rgb(128, 145, 165);" noshade="noshade" size="2"
width="100%" align="left"><br>
<br>
<br>
<font size="4">Hi,<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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).<br>
<br>
Thanks,<br>
Kennard<br>
<br>
<br>
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence_xml:xml_publ_handl: bad body format<br>
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence:handle_publish: in event specific publish handling<br>
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<br>
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<br>
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence:send_error_reply: sending 500 Server Internal Error reply<br>
Sep 10 09:14:37 sdc01sip01 /var/run/openser/opensips-pres[15704]:
ERROR:presence:handle_publish: failed to send error reply </font><tt>_______________________________________________<br>
Users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
</tt><tt><a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></tt><tt><br>
</tt><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anca Vamanu
<a class="moz-txt-link-abbreviated" href="http://www.voice-system.ro">www.voice-system.ro</a>
</pre>
</body>
</html>