<!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">
<tt>Doing just before the exit, after the save() stuff.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 06/12/2013 03:50 PM, Miha wrote:
<blockquote cite="mid:51B86E8F.3030508@softnet.si" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi Bogdan,<br>
<br>
where exactly t_replicate() should be used?<br>
<br>
my script:<br>
<br>
<small> if (is_method("REGISTER") && is_from_local())<br>
{<br>
<br>
# make pua_usrloc send PUBLISH for phones
which do<br>
# not support presence<br>
# filter after User-Agent header<br>
if(!search("^User-Agent: X-Lite"))
pua_set_publish();<br>
<br>
## --NAT-- ##<br>
if (isflagset(5)) {<br>
setbflag(6);<br>
setbflag(7);<br>
};<br>
## --/NAT-- ##<br>
<br>
# authenticate the REGISTER requests
(uncomment to enable auth)<br>
if (!www_authorize("", "subscriber"))<br>
{<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
<b>t_replicate(<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="sip:xxx.xxx.xxx.xxx:5060">"sip:xxx.xxx.xxx.xxx:5060"</a>);</b><br>
if (!db_check_to())<br>
{<br>
sl_send_reply("403","Forbidden auth
ID");<br>
exit;<br>
}<br>
if (!save("location"))<br>
sl_reply_error();<br>
<br>
exit;<br>
}</small><br>
<br>
<br>
I am getting this:<br>
<br>
Jun 12 14:45:39 localhost /usr/sbin/opensips[12659]:
ERROR:pua:send_publish_int: New 'presence' PUBLISH and no body
found - invalid request<br>
Jun 12 14:45:39 localhost /usr/sbin/opensips[12659]:
ERROR:tm:_reply_light: failed to generate 200 reply when a final
401 was sent out<br>
Jun 12 14:45:39 localhost /usr/sbin/opensips[12659]:
ERROR:signaling:sig_send_reply_mod: failed to send reply with tm
module<br>
Jun 12 14:45:39 localhost /usr/sbin/opensips[12659]:
ERROR:registrar:send_reply: failed to send 200 OK<br>
<br>
thanks!<br>
<br>
miha<br>
<br>
<br>
<br>
<br>
Dne 6/12/2013 12:07 PM, piše Bogdan-Andrei Iancu:<br>
</div>
<blockquote cite="mid:51B84879.5020702@opensips.org" type="cite">
<pre wrap="">Hello Miha,
Yes, t_replicate() is designed to be used after to finished the local
processing of the REGISTER (like doing the save(location)).
This mechanism is intended to be used between servers in the same
platform, so you can use IP-based authentication for the replicated
REGISTERs (no need for digest auth). And you should not accept
replicated registers from anywhere, but only from servers from your
platform.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
On 06/11/2013 02:49 PM, Miha wrote:
</pre>
<blockquote type="cite">
<pre wrap="">HI,
I need a little info how replication of registrations is done. I just
use function t_replicate() in script where I am doing registration stuff?
What about security must there be any credential or how other proxy
deals with this? Can any proxy post this repication data to my server?
Thanks!
Miha
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
<br>
</blockquote>
</body>
</html>