<div dir="ltr">Hi Daniel,<br><div class="gmail_extra"><br><div class="gmail_quote">On 15 October 2014 14:51, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
one thing I wanted to add -- it may be good to backup the old value
of the sock and restore it later.<br>
<br></div></blockquote><div><br></div><div>Thanks - I had that in mind already.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
I am not sure if this is used in a context of a request that is
going to be forwarded as well to some other address. If yes, then
perhaps is it safer to backup and restore initial socket value.<br>
<br>
Perhaps it needs to check if the transaction exists and if not,
create it first via tm api, then set the new socket for message and
call the t_replicate function, not to get the dmq server socket in
tm.<br>
<br></div></blockquote><div><br></div><div>Sorry, I don't fully understand the last part?</div><div><br></div><div><br></div><div>Best regards</div><div><br></div><div>Charles</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
Cheers,<br>
Daniel<div><div><br>
<br>
<div>On 15/10/14 15:41, Charles Chance
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div>
<div dir="ltr">Hi Victor,
<div><br>
</div>
<div>I have now tested with Kamailio/DMQ listening on separate
IPs and the added forcing of send socket appears to address
the broken logic you describe.</div>
<div><br>
</div>
<div>So I will commit the change shortly, unless you can see any
problem with the proposed solution?</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Charles</div>
<div><br>
</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 13 October 2014 23:04, Charles
Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Victor,
<div><br>
</div>
<div>Have not had chance to test but can you try with
the following small patch (against master):</div>
<div><br>
</div>
<div>
<div><font face="courier new, monospace">diff --git
a/modules/dmq/dmq_funcs.c
b/modules/dmq/dmq_funcs.c</font></div>
<div><font face="courier new, monospace">index
3c9c8c3..331591f 100644</font></div>
<div><font face="courier new, monospace">---
a/modules/dmq/dmq_funcs.c</font></div>
<div><font face="courier new, monospace">+++
b/modules/dmq/dmq_funcs.c</font></div>
<div><font face="courier new, monospace">@@ -370,6
+370,7 @@ error:</font></div>
<div><font face="courier new, monospace"> int
cfg_dmq_t_replicate(struct sip_msg* msg, char* s)</font></div>
<div><font face="courier new, monospace"> {</font></div>
<div><font face="courier new, monospace">
dmq_node_t* node;</font></div>
<div><font face="courier new, monospace">+
struct socket_info* sock;</font></div>
<div><font face="courier new, monospace"> int i
= 0;</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace"> /*
avoid loops - do not replicate if message has come
from another node</font></div>
<div><font face="courier new, monospace">@@ -381,6
+382,11 @@ int cfg_dmq_t_replicate(struct sip_msg*
msg, char* s)</font></div>
<div><font face="courier new, monospace">
return -1;</font></div>
<div><font face="courier new, monospace"> }</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace">+ sock
= lookup_local_socket(&dmq_server_socket);</font></div>
<div><font face="courier new, monospace">+ if
(sock) {</font></div>
<div><font face="courier new, monospace">+
set_force_socket(msg, sock);</font></div>
<div><font face="courier new, monospace">+ }</font></div>
<div><font face="courier new, monospace">+</font></div>
<div><font face="courier new, monospace">
lock_get(&node_list->lock);</font></div>
<div><font face="courier new, monospace"> node
= node_list->nodes;</font></div>
<div><font face="courier new, monospace">
while(node) {</font></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Charles</div>
<div>
<div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 13 October 2014 14:05,
Victor V. Kustov <span dir="ltr"><<a href="mailto:coyote@bks.tv" target="_blank">coyote@bks.tv</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Charles<br>
<br>
Main problem - usage t_replicate from TM
module. All TM funcs operate<br>
with main kamailio interface and socket, but
DMQ interfaces and sockets<br>
needed.<br>
<br>
<br>
--<br>
WBR, Victor<br>
JID: <a href="mailto:coyote@bks.tv" target="_blank">coyote@bks.tv</a><br>
JID: <a href="mailto:coyote@bryansktel.ru" target="_blank">coyote@bryansktel.ru</a><br>
<div>
<div><br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<div><br>
</div>
</div>
</div>
<br>
</div></div><font face="Helvetica, Arial, sans-serif"><font><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd. Company registered in
England & Wales no. 7365592.</font> <font color="gray">Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt
Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>
<br><span>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
sr-dev mailing list
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</span></blockquote><span><font color="#888888">
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
</font></span></div>
<br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>
</div></div>
<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd.
Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>