Hello.
Regarding to this subject. I followed some instructions for the
AVPOPS module and i have created the next lines in mysql database. This is
the description of my usr_preferences table:
+-----------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------------+------+-----+---------+-------+
| uuid | varchar(64) | | | | |
| username | varchar(100) | | PRI | | |
| domain | varchar(128) | | PRI | | |
| attribute | varchar(32) | | PRI | | |
| value | varchar(128) | | PRI | | |
| type | int(11) | | | 0 | |
| modified | timestamp(14) | YES | | NULL | |
+-----------+---------------+------+-----+---------+-------+
I inserted the next data in the table:
+------+----------+--------+-----------+---------------+------+-------------
---+
| uuid | username | domain | attribute | value | type | modified
|
+------+----------+--------+-----------+---------------+------+-------------
---+
| | | | 00562 | 192.168.1.254 | 0 |
20050111152728 |
+------+----------+--------+-----------+---------------+------+-------------
---+
So what i want to do is check the first part of the RURI in the INVITE
message, for example if the INVITE is something like this
INVITE sip:005621111111@sip.mydomain.com SIP/2.0
My question is how can i match the 00562111111 with the 00562 in the field
"attribute" and therefore change the domain in the uri to:
INVITE sip:005621111111@192.168.1.254 SIP/2.0
I guess that a simple t_relay() then would send the message to the new
gateway.
If this possible?
Thanks in advance.
Best Regards,
Ricardo.-
-----Mensaje original-----
De: Ricardo Martinez [mailto:rmartinez@redvoiss.net]
Enviado el: Lunes, 10 de Enero de 2005 18:14
Para: serusers(a)lists.iptel.org
Asunto: RE: [Serusers] Dynamic Routes with SER.
Thanks Samuel,
I think the dispatcher module does not acomplish my requeriments for
now. I more interested now in the avpops module. I read some lines about
the module a few months ago for a similar problem. Is someone using this
module for something like this?. In particular i want to mantain a route
table for all my destinations and the respective terminating gateway. For
example :
Code Gateway
56 | 192.168.0.1
1 | 192.168.0.2
44 | 192.168.0.3
and so on....
This table is consulted for all the incoming request and then SER answer
with a Redirect for the particular GW.
Can someone provide me and example on how the AVPOPS module can handle this?
I will really appreciate....
Thanks in advance
Best Regards.
Ricardo.-
-----Mensaje original-----
De: Samuel Osorio Calvo [mailto:samuel.osorio@nl.thalesgroup.com]
Enviado el: Lunes, 10 de Enero de 2005 12:30
Para: dnay(a)ionosphere.net; serusers(a)lists.iptel.org; rmartinez(a)redvoiss.net
Asunto: RE: [Serusers] Dynamic Routes with SER.
Hi,
There are a couple of modules in version 0.9 which can be used for
dynamic routing depending on the desired functinality.
One is called dispatcher, and is meant to be a load balancer without
fair distribution. I think that you define a list of possible servers in
a database and the dispatcher module forwards message to one of them
(together with all within-dialog future responses and requests).
The other option is to use avpops module which provides an
attribute-value functionallity. You can use them to select the next hop
depending on the incoming SIP message parameters and the values present
in a database.
I would advise you to take a look at the documentation of both modules
to see if they suit your requirements before using the exec commands,
which are not 100% reliable and increases the memory requirements as you
have mentioned. From the exec module's readme:
1.5. Known Issues
There is currently no guarantee that scripts ever return and
stop blocking SIP server. (There is kill.c but it is not used
along with the current mechanisms based on popen. Besides that
kill.c is ugly).
Enjoy SER,
Samuel.
Unclassified.
>> Ricardo Martinez
<rmartinez(a)redvoiss.net> 01/10/05 05:22PM >>>
Darren:
Thanks for your quick answer. I was thinking in a similar
solution,
using a external program, in fact i use the exec_dset() functionality
for
something similar. I was thinking add to this solution a Redirect
Server?.
Maybe the call to the dynamic route proccess is in the Redirect
Server,
calling the exec_dset() function, so all the extra resource needed to
perform these tasks are used in the redirect server and no in my
Proxy-Registrar Server. Is just an idea..
IS this scalable maybe?
Is this posible?
Thanks in advance
Best Regards,
Ricardo Martinez.-
-----Mensaje original-----
De: Darren Nay [mailto:dnay@ionosphere.net]
Enviado el: Lunes, 10 de Enero de 2005 11:06
Para: Ricardo Martinez; 'serusers(a)lists.iptel.org'
Asunto: Re: [Serusers] Dynamic Routes with SER.
Take a look in the SER Admin guide at "Executing an External Program".
You
can write an application with perl, C, etc.. Which will process the
call
info and return a destination set. This functionality is available
using
the exec_dset function in SERs exec module.
I use this feature in our SER deployment and it works great. The only
problem I've found so far is that it definitely does increases the
resources
required per call, and hurts your scalability. Especially if you use
perl.
Try to use C if at all possible, or persistent perl at the very least.
Darren Nay
On 1/10/05 11:01 AM, "Ricardo Martinez" <rmartinez(a)redvoiss.net>
wrote:
Hello List.
I have a question on how to handle dynamic routes in SER. For what
i know, SER by himself is not the best way to handle dynamic routes,
since
every change in a route implies a change in the
ser.cfg file and then
a
restart of the service. So i'm thinking how to
solve this problem
and a
was
hoping that someone could give some advice on this
issue.
Any idea is welcome.
Thanks in advance.
BEst Regards.
Ricardo Martinez.-
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers