<div dir="ltr"><div><div><div>Hello again,<br><br></div>I have discovered that we can use the command t_relay with parameters, and we have started using with this option.<br><br></div>t_relay("tcp:REMOTE_IP:5060")<br><br></div><div>The problem persists also with this command.<br></div><div>Opensips starts working well, but after some minutes it degrades and start sending the INVITE with TCP wrong ports. (I supose opensips is using destination port as source and viceversa)<br><br></div><div>With this situation we have seen some strange logs that could be related with the issue.<br></div><div>Please see these logs below.<br><br></div><div>Could anybody help us to solve this issue? <br></div><div><br>Jul 15 04:55:12 /usr/sbin/opensips[28821]: WARNING:core:tcpconn_add_alias: possible port hijack attempt<br>Jul 15 04:55:12 /usr/sbin/opensips[28821]: WARNING:core:tcpconn_add_alias: alias already present and points to another connection (6 : 5060 and 38 : 5060)<br>Jul 15 04:55:12 /usr/sbin/opensips[28821]: WARNING:core:receive_msg: tcp alias failed<br>Jul 15 04:55:12 /usr/sbin/opensips[28821]: WARNING:core:tcpconn_add_alias: possible port hijack attempt<br>Jul 15 04:55:12 /usr/sbin/opensips[28821]: WARNING:core:tcpconn_add_alias: alias already present and points to another connection (6 : 5060 and 38 : 5060)<br>Jul 15 04:55:12 /usr/sbin/opensips[28821]: WARNING:core:receive_msg: tcp alias failed<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-14 16:52 GMT+02:00 Albert Vallespi Ofertas <span dir="ltr"><<a href="mailto:avallespi.ofertas@gmail.com" target="_blank">avallespi.ofertas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hello again,<br><br></div>I have also configures $du and $dp to the correct one.<br><br></div>I am logging the $du before the t_relay and the log shows the correct port in the $du, but if I take traces I observe that the ports are not correct.<br></div>INVITE is sent from opensips tcp port 5060 to a 64XXX port of the destination. It should be viceversa.<br><br></div>Normally it takes some minutes working well with the correct ports, but after some minutes it degrades and opensips starts to send the INVITES with the TCP ports incorrects.<br><br></div>Could anybody please help me?<br><br></div>I have seen this thread, but I'm not sure if could be some related.<br><a href="https://github.com/OpenSIPS/opensips/issues/420" target="_blank">https://github.com/OpenSIPS/opensips/issues/420</a><br><br></div>Best regards<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-07-13 13:54 GMT+02:00 Podrigal, Aron <span dir="ltr"><<a href="mailto:aronp@guaranteedplus.com" target="_blank">aronp@guaranteedplus.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Make sure you have the correct value set for $du /$dp most likely you have some function overriding that. </p><div><div>
<div class="gmail_quote">On Jul 13, 2015 7:47 AM, "Albert Vallespi Ofertas" <<a href="mailto:avallespi.ofertas@gmail.com" target="_blank">avallespi.ofertas@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Aron,<br><br></div><div>Yes, we have tested also with force_send_socket("tcp:eth2_IP:5060") and it happens the same.<br></div><div>Do you think I should use the command this way?<br></div><div><br></div><div>After a volume of correct calls, opensips degrades and start sending TCP INVITES to a different port that the indicated in the r-uri.<br></div>We have test in so many ways with some of these instructions, but always happened the same.<br><br></div><div>Thanks a lot for the answer<br></div><div><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-13 13:39 GMT+02:00 Podrigal, Aron <span dir="ltr"><<a href="mailto:aronp@guaranteedplus.com" target="_blank">aronp@guaranteedplus.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Have you tried using force_send_socket()? </p>
<div class="gmail_quote"><div><div>On Jul 13, 2015 5:35 AM, "Albert Vallespi Ofertas" <<a href="mailto:avallespi.ofertas@gmail.com" target="_blank">avallespi.ofertas@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>Hello again,<br><br></div>We have re-checked the case, and I think there is no relation with "user=phone" parameter in the r-uri.<br><br></div>We have verified that in our scenario, forwarding from UDP to TCP opensips sends INVITE in the TCP side to a wrong port.<br></div>I think it changes origin and destination ports. This seems a opensips bug.<br><div><br>- Network1 is using UDP, and opensips listens at port UDP:eth1_IP:5060<br>
- Network2 is using TCP, and opensips listens at port TCP:eth2_IP:5060<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-10 19:46 GMT+02:00 Albert Ofertas <span dir="ltr"><<a href="mailto:avallespi.ofertas@gmail.com" target="_blank">avallespi.ofertas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi to all,<br>
<br>
We have a new opensips r.2.1 in a production environment where it is configured between two different networks.<br>
We are using always private networks, therefore there is not any NAT or similar.<br>
<br>
- Network1 is using UDP, and opensips listens at port UDP:eth1_IP:5060<br>
- Network2 is using TCP, and opensips listens at port TCP:eth2_IP:5060<br>
<br>
We have observed that when we forward an INVITE from Network1 to Network2 sometimes there is a port mismatch in the outgoing INVITE.<br>
<br>
This INVITE should go from opensipts TCP:eth2_IP:6xxxx (for example 63445) to the remote peer that uses TCP:REMOTE_IP:5060.<br>
What we have observed is that this INVITE many times and without a logical explanation mixes the ports.<br>
I mean, the r-uri is correct (example: XXXXXX@REMOTE_IP:5060;transport=tcp;user=phone), but the message is sent via TCP with the ports crossed.<br>
The wrong INVITE is going from TCP:eth2_IP:5060 to TCP:REMOTE_IP:6xxxx.<br>
<br>
We have observed that this incorrect behaviour in opensips is happening when we are using the parameter "user=phone" in the request uri.<br>
<br>
We have tested some minutes without the "user=phone" and we have not observed the port mismatch then.<br>
<br>
We must use the parameter "user=phone". This is a mandatory parameter in our case because we are sending always this INVITE to a MediaGateway that requires it to translate the uri and send the call to the telephony network.<br>
<br>
¿Could you please help us to solve this issue?<br>
<br>
Best regards<br>
<br>
Albert Vallespí</blockquote></div><br></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>