<!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>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>
t_newtran(); <BR>
# send the register to the proxy<BR>
rewritehostport("open-ims.test:4060");<BR>
t_on_reply("REGISTER_reply");<BR>
#t_on_failure("REGISTER_failure");<BR>
if (!t_relay()) {<BR>
sl_send_reply("500","Error forwarding to P-CSCF");<BR>
break;<BR>
}<BR>
}<BR>
onreply_route[REGISTER_reply]<BR>
{ <BR>
if (t_check_status("401")){ <BR>
log(-1, "A response from the P-CSCF!");<BR>
break;<BR>
}<BR>
if (t_check_status("200")){<BR>
log(-1, "User registered in the IMS Core!");<BR>
save_contacts("location");<BR>
break;<BR>
}<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 "save_contacts("location"))", 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>
if (method=="REGISTER") {<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("rebeca.node.es.com", "5060");<BR>
<BR>
or if you do not use DNS<BR>
<BR>
t_replicate("10.1.x.y", "5060");<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("/;userAgent=rupert")) {<BR>
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 "Martínez García, Rebeca"<BR>
Sent: 08 January 2010 11:52<BR>
To: serusers@lists.iptel.org<BR>
Cc: "Huertas García, Victor"<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 192.168.x.y 10.1.x.x 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>
</FONT>
</P>
</BODY>
</HTML>