[Serusers] pdt module

Richard mypop3mail at yahoo.com
Wed May 12 13:32:27 CEST 2004


Thanks Daniel,

That's really cool. Subst_uri is hard coded in the
script. It probably won't be too hard to put the re
strings into mysql and ask the script to read and
execute.

Richard

--- Daniel-Constantin Mierla <daniel at iptel.org> wrote:
> 
> On 5/12/2004 11:08 AM, Richard wrote:
> 
> >Due to the lack of resources, this is my temporary
> >solution. I am using cisco PSTN gateway. When
> >configuring dial-peer for one domain, I use the dns
> >name as session target instead of ip address. The
> >message Cisco sends to ser will be 5551212 at test.com
> >instead of 5551212@<ser-ip-address>. To convert the
> >PSTN number to internal extension, I use alias. I
> >don't know about the scalability of alias table.
> With
> >many users, it can grow very large. It would be
> nice
> >if we can have regular express to manipulate the
> uri.
> >  
> >
> There are several  regular expression functions that
> can be used in ser 
> config file. Take a look at the textops module. For
> example, using 
> subst_uri() you can apply perl-like regular
> expression operations to the 
> request uri. Searching on the mailing list archive
> will rise several 
> examples of usage.
> 
> .Daniel
> 
> >So each company only has one entry in the alias
> table.
> >
> >Thanks,
> >Richard
> >
> >
> >--- Elena Ramona Modroiu <ramona at iptel.org> wrote:
> >  
> >
> >>Hi,
> >>
> >>right now you cannot bypass the terminator digit
> of
> >>the code. This 
> >>solution was chosen having in mind automatic
> >>generation and no length 
> >>limitation of prefixes. 
> >>
> >>The module was intended to serve the calls from
> >>terminal adapters to 
> >>other domains. There are a lot of different
> >>situations in real world and 
> >>the module could be extended in the future to
> >>address the most common 
> >>ones. Contributors are always welcome! :-)
> >>
> >>Ramona
> >>
> >>Richard wrote:
> >>
> >>    
> >>
> >>>Hi,
> >>>
> >>>I had a chance to try the pdt module. It works
> very
> >>>well. In pdt module in source code, there is a
> very
> >>>good README. Also under pdt/doc, there are
> several
> >>>      
> >>>
> >>sql
> >>    
> >>
> >>>and php scripts.
> >>>
> >>>First create a database "pdt" and a table
> >>>      
> >>>
> >>"domains".
> >>    
> >>
> >>>Grant ser access to the database if you want. The
> >>>table domains has two columns "code" and
> "domain".
> >>>      
> >>>
> >>For
> >>    
> >>
> >>>example, a domain abc.com has e164 number range
> >>>2345xyz. It uses xyz for internal extension and
> sip
> >>>uri xyz at abc.com. You can manually add a record
> with
> >>>2345 as code and abc.com as domain. When a call
> >>>      
> >>>
> >>comes
> >>    
> >>
> >>>in via pstn gateway to 2345678 at 1.2.3.4. The
> >>>      
> >>>
> >>function
> >>    
> >>
> >>>prefix2domain translates it into 678 at abc.com.
> >>>
> >>>What I don't understand is the terminator digit.
> >>>      
> >>>
> >>It's
> >>    
> >>
> >>>a digit used by all domains to end a code. For
> >>>example, if it is 5 and code is 234,
> prefix2domain
> >>>translate 2345678 to 678 by removing code and
> then
> >>>terminator. In North American, there is no
> >>>      
> >>>
> >>terminator.
> >>    
> >>
> >>>Is there a way to bypass it?
> >>>
> >>>Another issue is that the function removes the
> code
> >>>      
> >>>
> >>>from original number. The assumption is that the
> >>    
> >>
> >>>domain owns the whole block. It is not always the
> >>>case. For example, company A may have
> >>>      
> >>>
> >>2345200-2345399
> >>    
> >>
> >>>and company B have 2345400-2345599. So code 2345
> is
> >>>possible to be mapped into two companies. We
> can't
> >>>      
> >>>
> >>use
> >>    
> >>
> >>>two records mapping 23452 and 23453 to company A
> >>>because it creates overlapped number. In another
> >>>example, a company has two number blocks,
> >>>2345200-2345299 and 6789200-6789299. Two records
> >>>      
> >>>
> >>can
> >>    
> >>
> >>>be defined in the database, map 23452 and 67892
> to
> >>>      
> >>>
> >>the
> >>    
> >>
> >>>same domain. Same problem, the rest of numbers
> are
> >>>      
> >>>
> >>in
> >>    
> >>
> >>>an overlapped range. 
> >>>
> >>>The problem can be solved if we can define how
> many
> >>>digits are removed instead of removing all code
> >>>digits. In the first example, we can define code
> >>>      
> >>>
> >>23454
> >>    
> >>
> >>>and 23455 map to A.com, but only remove the
> initial
> >>>four digits. So they rest of number are unique
> >>>      
> >>>
> >>within
> >>    
> >>
> >>>company A. In the second example, we only remove
> >>>      
> >>>
> >>the
> >>    
> >>
> 
=== message truncated ===



	
		
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861 




More information about the sr-users mailing list