Hi,
Thanks for your reply.
Alan Litster wrote:
Doing it the way you've suggested would mean modifying the From and To
Indeed. I already tried that, using the replace() / replace_all() textops functions, but I could not even manage to have the header modified. It just did nothing at all ....
Besides, in the recent thread Re: [Serusers] HF replace, someone said that modifying From: and To "is not allowed".
But I am wondering ... ain't it the "Contact:" header which is used by register.so/usrloc.so ?
fields, then doing a save. This should in theory all the UAC to register on the two addresses, it could get a little messy.
I agree. I anticipate a few issues on that side.
An alternative would be to create an alias, this would be fine if you knew before hand what format they would register with.
Well, I know which server will send what format, and I can afford to hardcode the IPs in the ser.cfg. But after reading the section about aliases in the ser Admin's manual, I must confess it is not clear for me. Could you elaborate on that idea ?
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org]On Behalf Of Jerome Martin Sent: 04 May 2005 15:16 To: serusers@lists.iptel.org Subject: [Serusers] I need to alter and duplicate REGISTER saves
Hello everyone,
After looking everywhere in the docs and ML archives, I couldn't find a way to solve my problem, so I would appreciate any help.
We have several iPBX servers sending REGISTERs to a SER registrar. Some of those servers send us the numbers to register as aor in the form 0XXXXXXXXX (local numbering plan), some other in the form 33XXXXXXXXX (local country code prefix). For various reasons, we need to handle those different REGISTERs simultaneously, and be able to lookup both formats in the location database.
What I'm looking for is a way to "duplicate" the REGISTER entries, i.e. when ser receives a REGISTER for 33XXXXXXXXX, I'd like it to save() the 33XXXXXXXXX, but also create an entry for the corresponding 0XXXXXXXXX.
Example : SER receives a REGISTER request for 33122334455. I'd like to have two aors in the location database, so that lookup("33122334455") and lookup("0123344556") would both return the same thing.
What I have in mind is something like this :
if (method=="REGISTER") { # Always save the original aor save("location");
# If the number starts with 33, also save a duplicate aor in the 0XXXXXXXXX format if (search("^From.*sip:33.*")) {
# Insert some code to alter the received SIP message and change the # number in order to save the 0XXXXXXXXX aor # ... # ... # ... save("location"); break;
} break; };
Can anyone help ?
Best Regards, Jerome Martin
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
This email, and any files transmitted with it, is copyright and may contain confidential information. The contents are intended for the use of the addressee(s) only. Unauthorized use may be unlawful. If you receive this email by mistake, please advise sender immediately. The views of the author may not necessarily constitute the views of the company. Nothing in this mail shall bind the company in any contract or obligation.
Tel +44 (0) 20 8002 6000 Fax +44 (0) 20 8002 6060
This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________