<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<tt>Hello Miguel,<br>
<br>
The "3" from the is_from_gw() matches the "type" column" from the
dr_gateways table - it has nothing to do with the dr_group table.<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 05/16/2013 11:18 PM, Miguel J. López Valverde wrote:
<blockquote cite="mid:1368735519.2542.27.camel@home.colours"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="GENERATOR" content="GtkHTML/3.30.3">
Dear Bogdan-Andrei<br>
<br>
I've tried to asign a new group for this providers, (group 3, I
can't asign it to group 0 because this group is used by another
type of users). I've filled dr_groups registers with this new
information, (dr_gateways was filled before, on 1.8 release):<br>
<br>
select * from dr_gateways;<br>
+----+---------------------+------+----------------+-------+------------+-------+------------+-------------------+<br>
| id | gwid | type | address | strip |
pri_prefix | attrs | probe_mode | description |<br>
+----+---------------------+------+----------------+-------+------------+-------+------------+-------------------+<br>
| 1 | Provider_0 | 2 | XXX.XXX.XXX.XXX| 0 |
NULL | NULL | 0 | Provider0_incoming|<br>
<br>
<br>
<br>
select * from dr_groups;<br>
+----+-------------------+-----------------+---------+---------------------------+<br>
| id | username | domain | groupid |
description |<br>
+----+-------------------+-----------------+---------+---------------------------+<br>
| 24 | Provider_0 | XXX.XXX.XXX.XXX| 3 |
Provider0_incoming |<br>
<br>
<br>
And the new configuration:<br>
<br>
} else if (is_from_gw()) {<br>
# request comes from gw<br>
setflag(21);<br>
<br>
} else if (is_from_gw("3","n")) {<br>
# request comes from gw with strange udp-ports<br>
setflag(21);<br>
}<br>
<br>
With this configuration, the is_from_gw() directive is working
right for providers without dr_groups db information and using
5060 port, but the is_from_gw("3","n") aren't working, it don't
match with providers of group 3 and working with ports diferents
of 5060.<br>
<br>
¿Are this configuration wrong?.<br>
<br>
Thankyou very much for your help.<br>
<br>
<br>
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
-- <br>
<br>
<img src="cid:part1.07090305.07020903@opensips.org"
align="bottom" border="0"><br>
<br>
<font size="1"><font color="#000033">-----</font></font><br>
<font size="1"><font color="#000033">Sus datos de carácter
personal (nombre, apellidos, dirección postal y de
correo electrónico, etc.) son tratados para la gestión
de su relación con la Entidad, así como para el envío
de información sobre nuestra actividad y la de
terceros relacionadas con la actividad de Consulting
Smartic Solutions, S.L., CIF: B85130037, C/Pº de la
Castellana, 135, 7ª planta, 28046 Madrid. Usted puede
ejercer sus derechos de acceso, rectificación,
cancelación y oposición dirigiéndose por escrito, con
copia de un documento que acredite su identidad, a la
dirección info (arroba) smartic.es.</font></font><br>
<font size="1"><font color="#000033">Este mensaje puede
contener información confidencial. Si usted no es su
destinatario, no debe leerlo, copiarlo, distribuirlo,
ni hacer uso de la información que contiene. En este
caso, por favor, llámenos o comuníquenoslo por escrito
y borre este mensaje de su sistema.</font></font><br>
<font size="1"><font color="#000033">----- </font></font><br>
<br>
</td>
</tr>
</tbody>
</table>
-----Mensaje original-----<br>
<b>De</b>: Bogdan-Andrei Iancu <<a moz-do-not-send="true"
href="mailto:Bogdan-Andrei%20Iancu%20%3cbogdan@opensips.org%3e">bogdan@opensips.org</a>><br>
<b>Para</b>: OpenSIPS users mailling list <<a
moz-do-not-send="true"
href="mailto:OpenSIPS%20users%20mailling%20list%20%3cusers@lists.opensips.org%3e">users@lists.opensips.org</a>><br>
<b>Cc</b>: "\"Miguel J.\" López Valverde" <<a
moz-do-not-send="true"
href="mailto:%22%5c%22%5c%5c%5c%22Miguel%20J.%5c%5c%5c%22%22%20%3d%3fISO-8859-1%3fQ%3fL%3dF3pez%3f%3d%20%22Valverde%5c%22%22%20%3cmjlopez@smartic.es%3e">mjlopez@smartic.es</a>><br>
<b>Asunto</b>: Re: [OpenSIPS-Users] use of is_from_gw directive
from drouting module.<br>
<b>Fecha</b>: Wed, 15 May 2013 20:59:47 +0300<br>
<br>
<tt>Hello Miguel,</tt><br>
<br>
<tt>Starting with 1.9, DR module does SIP wise resolving of the
destination (in order to find all the IPs behind the a FQDN, via
NATPR, SRV and A lookups). A side effect is that according to
SIP, no port means 5060.</tt><br>
<br>
<tt>In your case, the "n" flag should do the trick - but I
understand that when using it, your problem is what group to use
(by the way, "" group is translated to group 0 ) . Are your GWs
in various groups?</tt><br>
<br>
<tt>Regards,</tt>
<pre>Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
<br>
On 05/15/2013 04:16 AM, Miguel J. López Valverde wrote: <br>
<blockquote type="CITE"> Dear UserList Opensips:<br>
<br>
I used drouting with OpenSips 1.8.0 release, the gateways
list was in the dr_gateways table and no ports where
configurated in it. For incoming calls wasn't necesary.<br>
<br>
Now, I upgrade OpenSips to 1.9.1 release and for incoming
calls from a few providers, I can't do match they whith the
"is_from_gw()" directive. I tried in this diferents forms:<br>
<br>
is_from_gw(), OpenSips start and providers with 5060-udp
port match fine, but a few providers who employ other random
ports haven't match.<br>
is_from_gw("", "n"), OpenSips start but incoming calls
haven't match with the gateways on dr_gateways table.<br>
is_from_gw("-1", "n"), OpenSips don't start.<br>
is_from_gw("diferents_formats", "n"), OpenSips start but
incoming calls haven't match with the gateways on dr_gateways
table.<br>
<br>
Then I need to ask you...<br>
<br>
¿How I have to use the is_from_gw directive with "n"
parameter and dr_gateways table with the list of incoming calls
providers?.<br>
<br>
¿Which is the field on the dr_gateways table where i can
make match with type parameter on the is_from_gw directive?.<br>
<br>
Thanyou very much and best regards.<br>
<br>
Miguel J. López.
<pre>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<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>
</pre>
</blockquote>
</blockquote>
</body>
</html>