[Serusers] Prefix from the To user to the from user

Atle Samuelsen clona at cyberhouse.no
Mon Feb 19 10:10:09 CET 2007


Hi,

Depending on how many users you want on this etc.. you could use the
exec module.

There you just take check the length of the request-uri, then if it's
say 3: you take the rest from the from-header.

and so on... This has proven to work rather well infact with scenario.

- Atle



* Greger V. Teigre <greger at teigre.com> [070219 09:36]:
> Yes, that's a tricky one in 0.9.6... Have you looked at the following modules:
> speeddial
> pdt
> lcr
> 
> If they cannot help you, you will need to implement your own module (or think differently).
> g-)
> 
> 
> Ibrahim Hamouda wrote:
> >Hi all
> >	This is my first post to the list, so I hope I can get some help.
> >
> >	Here is the scenario.
> >
> >	I'm building a SER server 0.9.6 with the following characteristics.
> >
> >	I'll be supporting different companies with multiple locations each.
> >
> >	The phone number will be 7 digits.
> >
> >	First 2 digits are the company, the following 2 digits are the
> >branch or location and the last 3 digits are the user number.
> >
> >	So, let's say companyA digits are 21, and companyB digits are 22.
> >	CompanyA has two branches 10 and 11.
> >
> >	Branch 10 has a user 100 (full number in subscriber table is
> >2110100), and a user 101 (full number in subscriber table is 2110101)
> >	Branch 11 has a user 100 (full number in subscriber table is
> >2111100).
> >
> >	CompanyB has a branch 10 and user within the branch 100 (full number
> >in subscriber table is 2210100)
> >
> >	I want user when dialing within the same branch to be able to dial
> >the other user number only. User 2110100 can dial 100 to reach User 2110101.
> >
> >	But if he wants to dial User 2111100 (Same company different branch)
> >he can dial 11100.
> >
> >	And if he wants to dial a user within another company he has to dial
> >the full 7 digits.
> >
> >	No to SER config
> >
> >	If ser receives a 3 digits number in the $ruri, it should extract
> >the first 4 digits from the From URI and prefix the $ruri/username with
> >them.
> >	If ser receives a 5 digits number in the $ruri, it should extract
> >the first 2 digits from the From URI and prefix the $ruri/username with
> >them.
> >
> >	My problem is how to extract the first 2 or first 4 digits from the
> >from URI.
> >
> >	Any ideas?
> >
> >
> >Thanks in advanced for your help, I have spent 5 days now trying to figure
> >this one out.
> >
> >Ibrahim Hamouda
> >
> >
> >_______________________________________________
> >Serusers mailing list
> >Serusers at lists.iptel.org
> >http://lists.iptel.org/mailman/listinfo/serusers
> >
> >
> >  
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers



More information about the sr-users mailing list