Marian,
I had much the same problem. I decided to start a new ser process for each domain. I then modified the tables:
1) changed the 'base' table name to (for example) basesubscriber. 2) created a 'view' on the 'basesubscriber' called 'subscriber' 3) I based the view on the user name, which is also (by my convention) the domain name.
Using this technique I have dozens of ser processes updating the same base table through views. Of course, all of the other tables need views as well (like aliases, location, grp, etc). Restarting one domain doesn't affect another.
-g
On Oct 5, 2004, at 9:00 PM, kcassidy@kakelma.mine.nu wrote:
On Tue, 5 Oct 2004, Bogdan-Andrei IANCU wrote: Hi Marian,
Thanks for the reply. You're right on the code snippet that you've sent. That's exactly what I want :). But what I'm thinking if it's possible to do it via the dbase? Because I'm afraid this won't scale if the number of domains grow and need to restart ser everytime I add a domain. Now what I'm thinking is to create aliases for each of the entries I have. Do you think that's a good idea? Or any better solution?
thanks.
Hi,
is this what you want to do?
if ( uri=~"sip:.*@domain1" ) { prefix("111"); } else if (......) { ...... }
for revert operation (prefix->domain translation) there is already a module (pdt). But afaik not for what you want.
regards, Marian
kcassidy@kakelma.mine.nu wrote:
Hi All,
Is it possible to add a prefix to a uri based on domain? I'm trying to play around with multiple domains and I want users under the same domain to dial only a few numbers to get in touch with each other (ala pabx).
Any hints?
TIA
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Greg Fausak www.AddaBrand.com (US) 469-546-1265