<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [Serusers] configure SER to work as a gateway</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>Authentication in my upstream server is a MUST in my case and I cannot disable it, sorry.<BR>
In fact I would be going against the standards for what I am configuring if I disabled authentication.<BR>
<BR>
I only wanted SER for the special case of internal calls inside a private LAN, but I am realising it is not as simple<BR>
as I though it would be.<BR>
<BR>
In any case, thanks for the support.<BR>
<BR>
Regards,<BR>
Rebeca Martínez<BR>
<BR>
-----Mensaje original-----<BR>
De: rupert.organ@bt.com [<A HREF="mailto:rupert.organ@bt.com">mailto:rupert.organ@bt.com</A>]<BR>
Enviado el: vie 15/01/2010 12:06<BR>
Para: Martínez García, Rebeca<BR>
Asunto: RE: [Serusers] configure SER to work as a gateway<BR>
<BR>
Not that I know of...<BR>
<BR>
Anyway, we had the same problem....but solved it by disabling authentication on the upstream server.<BR>
<BR>
After all...you are now in a &quot;trusted zone&quot;....you have successfully &quot;auth challenged&quot; on the SER...so no need to do it twice....SER&nbsp; &quot;IS&quot; the Registrar, thats what it is designed to be....an architecture with 2 Registrars is not good.<BR>
<BR>
If you can turn off auth on the upstream server then this is best. When you t_replicate Registers SER just ignores the 200ok back from the upstream server....after all it is just sending the register as a courtesy gesture.<BR>
<BR>
Rupert<BR>
<BR>
________________________________<BR>
<BR>
From: &quot;Martínez García, Rebeca&quot; [<A HREF="mailto:remartinez@indra.es">mailto:remartinez@indra.es</A>]<BR>
Sent: 15 January 2010 10:54<BR>
To: Organ,RJE,Rupert,DRK R<BR>
Cc: serusers@lists.iptel.org; &quot;Huertas García, Victor&quot;<BR>
Subject: RE: [Serusers] configure SER to work as a gateway<BR>
<BR>
<BR>
<BR>
<BR>
Hi all,<BR>
<BR>
Rupert you were right, SER does not permit to save the location based on the reg of a different upstream server; which means<BR>
that I have to make &quot;save_contacts(&quot;location&quot;) when SER receives the REGISTER.<BR>
However, as it then sends directly to my client a 200 OK, when the client receives the &quot;401 Unauthorized&quot; error from my server,<BR>
it does not authenticate with it because it has received a previous 200 OK (from SER...).<BR>
<BR>
So, here is my question: Is it possible to make SER not send a 200 OK when saving the location of the user?<BR>
(I am only asking because I do not know).<BR>
<BR>
Thanks in advance,<BR>
Rebeca Martinez<BR>
<BR>
-----Mensaje original-----<BR>
De: rupert.organ@bt.com [<A HREF="mailto:rupert.organ@bt.com">mailto:rupert.organ@bt.com</A>]<BR>
Enviado el: lun 11/01/2010 12:37<BR>
Para: Martínez García, Rebeca<BR>
Asunto: RE: [Serusers] configure SER to work as a gateway<BR>
<BR>
Rebeca,<BR>
<BR>
i am not an expert, but if I had to guess...then i would guess it would be because there is no contacts in the 200 to a Register.<BR>
<BR>
In our ser.cfg we&nbsp;&nbsp;&nbsp;&nbsp; save(&quot;location&quot;);&nbsp; after testing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method==&quot;REGISTER&quot;) {<BR>
<BR>
but I can see that you are making registration and saving of info into location dependent on successful reg on a different upstream server. I do not think that is possible because you need to make the decision to save into location based on the reg that SER has received...and not based on the response of an upstream element....but if I am wrong I would be interested in the answer...<BR>
<BR>
Rupert<BR>
<BR>
________________________________<BR>
<BR>
From: &quot;Martínez García, Rebeca&quot; [<A HREF="mailto:remartinez@indra.es">mailto:remartinez@indra.es</A>]<BR>
Sent: 11 January 2010 11:21<BR>
To: Organ,RJE,Rupert,DRK R<BR>
Cc: serusers@lists.iptel.org; &quot;Huertas García, Victor&quot;<BR>
Subject: RE: [Serusers] configure SER to work as a gateway<BR>
<BR>
<BR>
<BR>
<BR>
Hi all,<BR>
<BR>
Thanks Rupert for your answer, I realise that my explanation was not very clear but the scenario I am<BR>
working into is a little bit complex.<BR>
<BR>
Finally, I have decided to change my configuration and make the client sends its REGISTER message to<BR>
SER and then it will forward the same message to my Server. However, the Server carries out the authentication<BR>
process (I can not change it), so SER has to save the location contact after the client is authenticated in the Server.<BR>
<BR>
My function for the REGISTER message in SER is the following one:<BR>
<BR>
route[REGISTER]<BR>
{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_newtran();&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # send the register to the proxy<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewritehostport(&quot;open-ims.test:4060&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;REGISTER_reply&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #t_on_failure(&quot;REGISTER_failure&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!t_relay()) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;500&quot;,&quot;Error forwarding to P-CSCF&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
}<BR>
onreply_route[REGISTER_reply]<BR>
{&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (t_check_status(&quot;401&quot;)){&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(-1, &quot;A response from the P-CSCF!&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (t_check_status(&quot;200&quot;)){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(-1, &quot;User registered in the IMS Core!&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save_contacts(&quot;location&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
}<BR>
<BR>
But SER does not start. It shows this error:<BR>
<BR>
cng@cng:~$ sudo /etc/init.d/ser start -P /var/run/ser/ser.pid<BR>
Starting ser: ser 0(2545) parse error (147,19-20): Command cannot be used in the block<BR>
<BR>
I have checked where is the error and it complains about the &quot;save_contacts(&quot;location&quot;))&quot;, but I<BR>
do not know why I can not use it inside the onreply_route.<BR>
<BR>
Thanks in advance,<BR>
Rebeca Martinez<BR>
<BR>
-----Mensaje original-----<BR>
De: rupert.organ@bt.com [<A HREF="mailto:rupert.organ@bt.com">mailto:rupert.organ@bt.com</A>]<BR>
Enviado el: vie 08/01/2010 15:03<BR>
Para: Martínez García, Rebeca<BR>
Asunto: RE: [Serusers] configure SER to work as a gateway<BR>
<BR>
Hi Rebeca,<BR>
<BR>
I think I understand what you are trying to do, albeit you describe it in a strange way.<BR>
<BR>
SER is designed to be a Registrar / SIP Proxy.<BR>
<BR>
It is not designed to proxy REGISTER messages.<BR>
<BR>
However I had to interface it to a SIP Application Server that wanted to see the REGISTER messages. However SER was my REGISTRAR and performed my security / authentication.<BR>
<BR>
Therefore I filter on the REGISTER messages using<BR>
<BR>
&nbsp;if (method==&quot;REGISTER&quot;) {<BR>
<BR>
after doing the auth challenge in the ser.cfg, and after doing an eNum lookup and some user agent field checks I simply t_replicate the REGISTER.<BR>
<BR>
i.e. t_replicate(&quot;rebeca.node.es.com&quot;, &quot;5060&quot;);<BR>
<BR>
or if you do not use DNS<BR>
<BR>
&nbsp;t_replicate(&quot;10.1.x.y&quot;, &quot;5060&quot;);<BR>
<BR>
Note this replication does not include the auth challenge....but it satisfys my SIP app server functionality nicely,<BR>
<BR>
Also you can overwrite the useragent field if you wish...<BR>
<BR>
e.g. if (subst_uri(&quot;/;userAgent=rupert&quot;)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subst('/^User-Agent:.*$/User-Agent: Rebeca/ig');<BR>
<BR>
Good luck<BR>
<BR>
Rupert<BR>
<BR>
<BR>
<BR>
<BR>
________________________________<BR>
<BR>
From: serusers-bounces@lists.iptel.org [<A HREF="mailto:serusers-bounces@lists.iptel.org">mailto:serusers-bounces@lists.iptel.org</A>] On Behalf Of &quot;Martínez García, Rebeca&quot;<BR>
Sent: 08 January 2010 11:52<BR>
To: serusers@lists.iptel.org<BR>
Cc: &quot;Huertas García, Victor&quot;<BR>
Subject: [Serusers] configure SER to work as a gateway<BR>
<BR>
<BR>
<BR>
<BR>
Hello all,<BR>
<BR>
Solved the installation problem I had, now I am trying to configure SER in a certain way.<BR>
My configuration is the following one:<BR>
<BR>
Client ------------------------- SER ---------------------------- Server/Proxy<BR>
192.168.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.x.y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.1.x.x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.1.x.y<BR>
<BR>
Unlike the normal case where SER is used as the Registrar, my client (in a private LAN) must register in a Server/Proxy<BR>
and SER has to act as a SIP gateway. However, at the same time, SER has to register locally this client (for internal calls).<BR>
<BR>
So, put in other words, SER should forward the REGISTER message (directed from the client to the Server/Proxy) and save locally the<BR>
location of that client. Once registered the user, SER should act as a transparent proxy.<BR>
<BR>
But in the practice, it does nothing if I put that the client registers in the Server/Proxy. The messages reach SER but it does not<BR>
forward them, nor it registers locally the clients.<BR>
So I tried configuring the client to register in SER instead of the Server/Proxy and then SER started to work.<BR>
<BR>
Is a listening problem? What I have to include to the ser.cfg so SER handles also messages which are not directed to it but to the Server/Proxy?<BR>
I hope somebody could help me.<BR>
<BR>
Thanks in advance,<BR>
Rebeca Martinez<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>