Hi Daryl,
Perhaps in your ser.cfg you can for a REGISTER message execute an external script (perl/bash) to pass argument to FIFO. For the variable to pass to your script take a look in the ser directory: ser-0.9.3/modules/exec/README
for the use of fifo for registration see below:
hope this could help
bye, Rodrigue
Suggested by Samuel Osorio Calvo: Try the following.....
################################################# #!/bin/sh
cat> /tmp/ser_fifo << :ul_add:return_fifo location sip:user@domain sip:user@IP {expires} {qvalue} {replicate} {flags}
##################################################
return_fifo is the name of the fifo (with a /tmp prefix) that will use SER for answering to the fifo command.If you don't want to read it, just don't worry about the possible complaint of FIFO not existing, error opening return fifo or something like that in SER log. location is the table where to add/update the record sip:user@domain-->AoR you might have to look at SER's debug output because I remember there was something with sip: prefix in either AoR or contact. I think using sip: will work but just check if you have to remove the sip: prefix from the contact.... sip:user@IP-->contact expires-->record validity in seconds qvalue-->[0..1] replicate-->bool 0|1 flags-->not 100% sure if it corresponds to the flag vector of SER or just indicate natted contacts...I recommend to use a 0 value here.. Remember to add an End Of File character in the last line or there are some funny parsing things with subsequent messages isnerted in the fifo...
Hope it helps,
Samuel.
Unclassified.
"Rodrigue ESTEVE" rodrigue@mobius.fr 06/28/05 09:13AM >>>
Does anybody have an explanation to use the fifo for registration (using a script and not the serctl command) ?
Thanks very much
_____
De : serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] De la part de Rodrigue ESTEVE Envoyé : mardi 14 juin 2005 19:00 À : serusers@lists.iptel.org Objet : [Serusers] Use of fifo for registration :ul_add: command tutorial
Hi all,
I would like to use ser_fifo to register a user; I think the :ul_add: command is the clue, but I don't how to use the fifo to do this.
My aim is to do the following:
I have a Voip gateway on a customer with a lot of phone number (700) and I would like to authenticate each number. Unfortunately I have to add a small amount of configuration on the voip gateway each time I add a number (uri), moreover I'm not sure this gateway will work with so many numbers, and the bandwidth needed to register each number every 5 minutes will be wasted.
The idea is to challenge only one time the gateway and then in ser.cfg if the challenge succeeds I execute a script to register by bulk all the numbers enclosed in a file on the proxy. To do this I have to pass arguments to the fifo using the :ul_add: command, but this is where I'm stuck.
I've done this:
echo :ul_add:receiving_fifo > /tmp/ser_fifo
echo location > /tmp/ser_fifo
echo 100 > /tmp/ser_fifo
echo sip:100@10.1.1.1:5060 > /tmp/ser_fifo
echo 300 > /tmp/ser_fifo
echo 0 > /tmp/ser_fifo
echo 2 > /tmp/ser_fifo
but it does not work, I think this is due to the receiving_fifo, I have to do something with it to process the response of SER, but what ??
I know I can use the following command to workaround the pbm, and I'm successful with this command:
Serctl fifo ul_add location *..
But it requires one process each time I register a number, and it takes 1 minute on a Celeron 700 for 500 numbers (30 % CPU), and I think using the fifo is a more suitable solution (less CPU consuming).
Thanks for your support,
Rodrigue
PS: I would like to register every 5minutes,cause the customer gateway is able to redirect to PSTN in case of failure.
_______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-----Message d'origine----- De : serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] De la part de Daryl Sanders Envoyé : samedi 9 juillet 2005 03:22 À : serusers@lists.iptel.org Objet : [Serusers] Userloc replication via FIFO
I'm looking for a way to replicate userloc changes to another SER box via FIFO. I am using FIFO via PHP to manipulate contacts, but I'm not sure how to replicate those changes to my other SER's memory. Any thoughts? Any help would be greatly appreciated. I'm kinda stumped on this one.
- Daryl
_______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers