Hi Anca,<br><br>I have finally been able to eliminate the loop and get the INVITEs being sent to the internal jain slee server by doing a rewritehostport before the b2b_init_request:<br><br>...<br>rewritehostport("<a href="http://10.253.22.143:5060">10.253.22.143:5060</a>");<br>
b2b_init_request("top hiding");<br>...<br><br>This way, the INVITE generated by the b2bua module has the destination correctly set to the internal jain slee server, instead of the public ip address of the opensips server.<br>
<br><br>Regards,<br>David<br><br><div class="gmail_quote">On Tue, Oct 19, 2010 at 11:39 AM, Anca Vamanu <span dir="ltr"><<a href="mailto:anca@opensips.org">anca@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">
Hi David,<div class="im"><br>
<br>
On 10/18/2010 05:29 PM, David Santiago wrote:
<blockquote type="cite">Hi again,<br>
<br>
I have made several changes to the script so that I can successfully
add, for instance, a custom header to the INVITE request that the b2bua
generates after receiving an external one. I'm doing it in a
local_route block which is the supposed way to process an outgoing
INVITE request that is going to be sent by the b2bua module, right?<br>
<br>
but.. I'm not being able to set the destination of such INVITE to the
place I want. I have tried the following:<br>
<ul>
<li>ds_select_dst() function: it works in the main route block, but
it cannot be used in a local_route block.</li>
<li>modifying $du variable. I can successfully modify this
variable, but it has no effect on where the INVITE is being sent to.</li>
<li>rewriteuri() function: same result as modifying $du variable.<br>
</li>
</ul>
I need that outgoing INVITE to be sent to a specific host and port, but
I do not see how to modify the current behaviour which is that the
INVITE is being sent to the public ip address of the opensips server,
which in turn generates a loop as that INVITE is processed by the b2bua
and a new INVITE is sent out to that same address again.<br>
<br>
<br>
</blockquote></div>
You can of course prevent this loop by calling b2b_init_request only if
the Invite does not come from the same instance of OpenSIPS, as I
suggested to you in the previous mail:<div class="im"><br>
<i>if (!has_totag() && is_method("INVITE") &&
!(src_ip=="MY_IP" &&<br>
src_port=="MY_PORT")) {<br>
</i>
<div><i> b2b_init_request("top hiding");<br>
exit;<br>
}</i></div>
<br></div>
I will implement the feature to take the value from $du if set
hopefully in the following days. I will let you know.<div class="im"><br>
<br>
Regards,<br>
<pre cols="72">--
Anca Vamanu
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a></pre>
<br>
<br>
<br>
</div><div><div></div><div class="h5"><blockquote type="cite">Regards,<br>
David<br>
<br>
<div class="gmail_quote">On Thu, Oct 14, 2010 at 9:08 AM, Anca Vamanu
<span dir="ltr"><<a href="mailto:anca@opensips.org" target="_blank">anca@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
David,<br>
<br>
The dispatcher is working right - just that if you use b2bua it doesn't<br>
have no effect as it does not use the newly set $du. Since it is sent<br>
again to your opensips you can do a filter after the source address of<br>
the message and do processing needed for the Invite going out if the<br>
source is itself.<br>
<br>
if (!has_totag() && is_method("INVITE") &&
!(src_ip=="MY_IP" &&<br>
src_port=="MY_PORT")) {<br>
<div> b2b_init_request("top hiding");<br>
exit;<br>
}<br>
</div>
....<br>
the rest of the changes needed.<br>
<br>
Anyhow, I should add using the $du as the outbound proxy for the newly<br>
generated request on the features to implement list.<br>
<br>
Regards,<br>
<font color="#888888">Anca<br>
</font>
<div>
<div><br>
<br>
On 10/13/2010 12:19 PM, David Santiago wrote:<br>
> I'll check it later, but the fact is that I have to solve first the<br>
> problem that prevents the INVITEs generated by OpenSIPs to be sent
to<br>
> the internal jain slee server.<br>
><br>
> I have confirmed that after the call to ds_select(), the value of
$du<br>
> points to such server (which has been obtained from the<br>
> /opt/opensipsnotls/etc/opensips/dispatcher.list file), but the
INVITEs<br>
> are not sent there, but to the public IP address of the OpenSIPs<br>
> server. Without the b2bua "setup", the dispatcher has been working<br>
> fine in other tests I've made...<br>
><br>
><br>
> Regards,<br>
> David<br>
><br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>