<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.30.3">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ffffff">
Hello Bogdan-Andrei,<BR>
<BR>
Thanyou very much for this information, I had not undertood the information give on manuals.<BR>
<BR>
Enyway, I tried also this forms and did no work correctly:<BR>
<BR>
dr_gateways have the next information:<BR>
<BR>
mysql> 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 |Provider_0_incoming|<BR>
<BR>
<BR>
With the is_from_gw("2","n") or dr_is_gw("$si","2","n") directives did the same and do not identify the carrier correctly. With the dr_is_gw directive, the next information appeared in the log file:<BR>
<BR>
ERROR:drouting:_is_dr_uri_gw: invalid sip uri <xxx.xxx.xxx.xxx><BR>
<BR>
Can I do some more testing?,<BR>
<BR>
Best Regards.<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<BR>
<IMG SRC="cid:1369039042.2542.80.camel@home.colours" 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>
</TABLE>
-----Mensaje original-----<BR>
<B>De</B>: Bogdan-Andrei Iancu <<A HREF="mailto:Bogdan-Andrei%20Iancu%20%3cbogdan@opensips.org%3e">bogdan@opensips.org</A>><BR>
<B>Para</B>: "\"Miguel J.\" López Valverde" <<A 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>Cc</B>: OpenSIPS users mailling list <<A HREF="mailto:OpenSIPS%20users%20mailling%20list%20%3cusers@lists.opensips.org%3e">users@lists.opensips.org</A>><BR>
<B>Asunto</B>: Re: [OpenSIPS-Users] use of is_from_gw directive from drouting module.<BR>
<B>Fecha</B>: Fri, 17 May 2013 13:57:38 +0300<BR>
<BR>
<TT>Hello Miguel,</TT><BR>
<BR>
<TT>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.</TT><BR>
<BR>
<TT>Regards,</TT>
<PRE>
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<A 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: <BR>
<BLOCKQUOTE TYPE=CITE>
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 CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<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>
<BR>
</TD>
</TR>
</TABLE>
-----Mensaje original-----<BR>
<B>De</B>: Bogdan-Andrei Iancu <<A HREF="mailto:Bogdan-Andrei%20Iancu%20%3cbogdan@opensips.org%3e">bogdan@opensips.org</A>><BR>
<B>Para</B>: OpenSIPS users mailling list <<A 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 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 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 HREF="mailto:Users@lists.opensips.org">Users@lists.opensips.org</A>
<A 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>