[asterisk-users] Telco with multipe SIP servers

Gareth Blades mailinglist+asterisk at dns99.co.uk
Mon Feb 3 03:39:26 CST 2014

On 02/02/14 14:42, Markus Reschke wrote:
> Hi!
> My telco is Deutsche Telekom and they got about 30 SIP servers right 
> now. Currently I've set up a template for incoming calls in sip.conf 
> and added each SIP server by it's IP address like this:
> [DTAG-in-1](DTAG-in-template)
> host=
> ...
> [DTAG-in-30](DTAG-in-template)
> host=
> I've done that to improve security and to be able to assign all calls 
> coming in via Deutsche Telekom to a dedicated dialplan context. 
> Unfortunately this approach is not scalable and it's a PITA to 
> maintain a list of server IP addresses since Deutsche Telekom will get 
> more SIP servers in the future. They've started to migrate the classic 
> POTS/ISDN network to VoIP, the goal is get it done by 2016. Customers 
> with DSL get VoIP directly, i.e. they need SIP phones or a SIP PBX, 
> and customers with a phone line only are converted by the MSAN. And 
> they don't provide an official list of the SIP servers :-( By some 
> reverse engineering I found out that all SIP servers are within a 
> specific subnet. Is there any way to match peers by subnet(s) instead 
> of FQDNs or single IP addresses? If not, it would be a feature really 
> needed to be able to cope with telcos running multiple or tons of SIP 
> servers.
> cu, Markus

You could consider making use of opensips. We use it for inbound sip 
connections and its fairly easy to get it to perform a database lookup 
against a connecting IP address and pull out a record and pass that onto 
Asterisk using a custom header. Asterisk can then trust connections from 
opensips and you can read in the custom header and have the dialplan 
decide what to do based upon the value.

More information about the asterisk-users mailing list