Liste Telekom SIP Server für eingehende Verbindungen

DanielYK

Neuer User
Mitglied seit
11 Mrz 2013
Beiträge
24
Punkte für Reaktionen
0
Punkte
1
In der Diskussion Eingehender Context - Zum allgemeinen Verständnis wurde bereits eine Telekom-Zusatzkonfigurartion mit allen SIP Servern gepostet.

UPDATE 30.10.2016

Code:
[telekom](!)
context=from-trunk
type=peer
defaultuser=[username]
remotesecret=[password]
realm=tel.t-online.de
qualify=no
keepalive=120
host=tel.t-online.de
fromdomain=tel.t-online.de
dtmfmode=auto
directmedia=no
sendrpid=pai
session-timers=refuse
disallow=all
allow=g722
allow=alaw
allow=gsm
deny=0.0.0.0/0
permit=217.0.0.0/13



[DTAG-IP_IN16_106](telekom) ;ipp
host=217.0.16.106


[DTAG-IP_IN17_106](telekom) ;ipp
host=217.0.17.106


[DTAG-IP_IN18_016](telekom)
host=217.0.18.16


[DTAG-IP_IN18_036](telekom)
host=217.0.18.36


[DTAG-IP_IN18_037](telekom)
host=217.0.18.37


[DTAG-IP_IN18_038](telekom)
host=217.0.18.38


[DTAG-IP_IN18_039](telekom)
host=217.0.18.39


[DTAG-IP_IN18_040](telekom)
host=217.0.18.40


[DTAG-IP_IN18_041](telekom)
host=217.0.18.41


[DTAG-IP_IN18_042](telekom)
host=217.0.18.42


[DTAG-IP_IN18_043](telekom)
host=217.0.18.43


[DTAG-IP_IN18_044](telekom)
host=217.0.18.44


[DTAG-IP_IN18_068](telekom)
host=217.0.18.68


[DTAG-IP_IN18_069](telekom)
host=217.0.18.69


[DTAG-IP_IN18_070](telekom)
host=217.0.18.70


[DTAG-IP_IN18_071](telekom)
host=217.0.18.71


[DTAG-IP_IN18_072](telekom)
host=217.0.18.72


[DTAG-IP_IN18_073](telekom)
host=217.0.18.73


[DTAG-IP_IN18_074](telekom)
host=217.0.18.74


[DTAG-IP_IN18_075](telekom)
host=217.0.18.75


[DTAG-IP_IN18_076](telekom)
host=217.0.18.76


[DTAG-IP_IN18_100](telekom)
host=217.0.18.100


[DTAG-IP_IN18_101](telekom)
host=217.0.18.101


[DTAG-IP_IN18_102](telekom)
host=217.0.18.102


[DTAG-IP_IN18_103](telekom)
host=217.0.18.103


[DTAG-IP_IN18_104](telekom)
host=217.0.18.104


[DTAG-IP_IN18_105](telekom)
host=217.0.18.105


[DTAG-IP_IN18_106](telekom)
host=217.0.18.106


[DTAG-IP_IN18_107](telekom)
host=217.0.18.107


[DTAG-IP_IN18_108](telekom)
host=217.0.18.108


[DTAG-IP_IN18_144](telekom)
host=217.0.18.144


[DTAG-IP_IN18_164](telekom)
host=217.0.18.164


[DTAG-IP_IN18_165](telekom)
host=217.0.18.165


[DTAG-IP_IN18_166](telekom)
host=217.0.18.166


[DTAG-IP_IN18_167](telekom)
host=217.0.18.167


[DTAG-IP_IN18_168](telekom)
host=217.0.18.168


[DTAG-IP_IN18_169](telekom)
host=217.0.18.169


[DTAG-IP_IN18_170](telekom)
host=217.0.18.170


[DTAG-IP_IN18_171](telekom)
host=217.0.18.171


[DTAG-IP_IN18_172](telekom)
host=217.0.18.172


[DTAG-IP_IN19_016](telekom)
host=217.0.19.16


[DTAG-IP_IN19_100](telekom)
host=217.0.19.100


[DTAG-IP_IN19_101](telekom)
host=217.0.19.101


[DTAG-IP_IN19_102](telekom)
host=217.0.19.102


[DTAG-IP_IN19_103](telekom)
host=217.0.19.103


[DTAG-IP_IN19_104](telekom)
host=217.0.19.104


[DTAG-IP_IN19_105](telekom)
host=217.0.19.105


[DTAG-IP_IN19_106](telekom)
host=217.0.19.106


[DTAG-IP_IN19_107](telekom)
host=217.0.19.107


[DTAG-IP_IN19_108](telekom)
host=217.0.19.108


[DTAG-IP_IN19_230](telekom) ;ipp
host=217.0.19.230


[DTAG-IP_IN20_038](telekom) ;ipp
host=217.0.20.38


[DTAG-IP_IN20_193](telekom)
host=217.0.20.193


[DTAG-IP_IN20_228](telekom)
host=217.0.20.228


[DTAG-IP_IN20_229](telekom)
host=217.0.20.229


[DTAG-IP_IN20_230](telekom)
host=217.0.20.230


[DTAG-IP_IN20_231](telekom)
host=217.0.20.231


[DTAG-IP_IN20_232](telekom)
host=217.0.20.232


[DTAG-IP_IN20_233](telekom)
host=217.0.20.233


[DTAG-IP_IN20_234](telekom)
host=217.0.20.234


[DTAG-IP_IN20_235](telekom)
host=217.0.20.235


[DTAG-IP_IN20_236](telekom)
host=217.0.20.236


[DTAG-IP_IN21_001](telekom)
host=217.0.21.1


[DTAG-IP_IN21_036](telekom)
host=217.0.21.36


[DTAG-IP_IN21_037](telekom)
host=217.0.21.37


[DTAG-IP_IN21_038](telekom)
host=217.0.21.38


[DTAG-IP_IN21_039](telekom)
host=217.0.21.39


[DTAG-IP_IN21_040](telekom)
host=217.0.21.40


[DTAG-IP_IN21_041](telekom)
host=217.0.21.41


[DTAG-IP_IN21_042](telekom)
host=217.0.21.42


[DTAG-IP_IN21_043](telekom)
host=217.0.21.43


[DTAG-IP_IN21_044](telekom)
host=217.0.21.44


[DTAG-IP_IN21_065](telekom)
host=217.0.21.65


[DTAG-IP_IN21_100](telekom)
host=217.0.21.100


[DTAG-IP_IN21_101](telekom)
host=217.0.21.101


[DTAG-IP_IN21_102](telekom)
host=217.0.21.102


[DTAG-IP_IN21_103](telekom)
host=217.0.21.103


[DTAG-IP_IN21_104](telekom)
host=217.0.21.104


[DTAG-IP_IN21_105](telekom)
host=217.0.21.105


[DTAG-IP_IN21_106](telekom)
host=217.0.21.106


[DTAG-IP_IN21_107](telekom)
host=217.0.21.107


[DTAG-IP_IN21_108](telekom)
host=217.0.21.108


[DTAG-IP_IN21_129](telekom)
host=217.0.21.129


[DTAG-IP_IN21_164](telekom)
host=217.0.21.164


[DTAG-IP_IN21_165](telekom)
host=217.0.21.165


[DTAG-IP_IN21_166](telekom)
host=217.0.21.166


[DTAG-IP_IN21_167](telekom)
host=217.0.21.167


[DTAG-IP_IN21_168](telekom)
host=217.0.21.168


[DTAG-IP_IN21_169](telekom)
host=217.0.21.169


[DTAG-IP_IN21_170](telekom)
host=217.0.21.170


[DTAG-IP_IN21_171](telekom)
host=217.0.21.171


[DTAG-IP_IN21_172](telekom)
host=217.0.21.172


[DTAG-IP_IN22_164](telekom)
host=217.0.22.164


[DTAG-IP_IN22_165](telekom)
host=217.0.22.165


[DTAG-IP_IN22_166](telekom)
host=217.0.22.166


[DTAG-IP_IN22_196](telekom)
host=217.0.22.196


[DTAG-IP_IN22_197](telekom)
host=217.0.22.197


[DTAG-IP_IN22_198](telekom)
host=217.0.22.198


[DTAG-IP_IN22_199](telekom)
host=217.0.22.199


[DTAG-IP_IN22_200](telekom)
host=217.0.22.200


[DTAG-IP_IN22_201](telekom)
host=217.0.22.201


[DTAG-IP_IN22_202](telekom)
host=217.0.22.202


[DTAG-IP_IN22_203](telekom)
host=217.0.22.203


[DTAG-IP_IN22_204](telekom)
host=217.0.22.204


[DTAG-IP_IN22_228](telekom)
host=217.0.22.228


[DTAG-IP_IN22_229](telekom)
host=217.0.22.229


[DTAG-IP_IN22_230](telekom)
host=217.0.22.230


[DTAG-IP_IN23_004](telekom)
host=217.0.23.4


[DTAG-IP_IN23_005](telekom)
host=217.0.23.5


[DTAG-IP_IN23_006](telekom)
host=217.0.23.6


[DTAG-IP_IN23_007](telekom)
host=217.0.23.7


[DTAG-IP_IN23_008](telekom)
host=217.0.23.8


[DTAG-IP_IN23_009](telekom)
host=217.0.23.9


[DTAG-IP_IN23_010](telekom)
host=217.0.23.10


[DTAG-IP_IN23_011](telekom)
host=217.0.23.11


[DTAG-IP_IN23_012](telekom)
host=217.0.23.12


[DTAG-IP_IN23_036](telekom)
host=217.0.23.36


[DTAG-IP_IN23_037](telekom)
host=217.0.23.37


[DTAG-IP_IN23_038](telekom)
host=217.0.23.38


[DTAG-IP_IN23_039](telekom)
host=217.0.23.39


[DTAG-IP_IN23_040](telekom)
host=217.0.23.40


[DTAG-IP_IN23_041](telekom)
host=217.0.23.41


[DTAG-IP_IN23_042](telekom)
host=217.0.23.42


[DTAG-IP_IN23_043](telekom)
host=217.0.23.43


[DTAG-IP_IN23_044](telekom)
host=217.0.23.44


[DTAG-IP_IN23_068](telekom)
host=217.0.23.68


[DTAG-IP_IN23_069](telekom)
host=217.0.23.69


[DTAG-IP_IN23_070](telekom)
host=217.0.23.70


[DTAG-IP_IN23_071](telekom)
host=217.0.23.71


[DTAG-IP_IN23_072](telekom)
host=217.0.23.72


[DTAG-IP_IN23_073](telekom)
host=217.0.23.73


[DTAG-IP_IN23_074](telekom)
host=217.0.23.74


[DTAG-IP_IN23_075](telekom)
host=217.0.23.75


[DTAG-IP_IN23_076](telekom)
host=217.0.23.76


[DTAG-IP_IN23_100](telekom)
host=217.0.23.100


[DTAG-IP_IN23_100](telekom)
host=217.0.23.100


[DTAG-IP_IN23_101](telekom)
host=217.0.23.101


[DTAG-IP_IN23_102](telekom)
host=217.0.23.102


[DTAG-IP_IN23_103](telekom)
host=217.0.23.103


[DTAG-IP_IN23_104](telekom)
host=217.0.23.104


[DTAG-IP_IN23_105](telekom)
host=217.0.23.105


[DTAG-IP_IN23_106](telekom)
host=217.0.23.106


[DTAG-IP_IN23_107](telekom)
host=217.0.23.107


[DTAG-IP_IN23_108](telekom)
host=217.0.23.108


[DTAG-IP_IN23_132](telekom)
host=217.0.23.132


[DTAG-IP_IN23_133](telekom)
host=217.0.23.133


[DTAG-IP_IN23_134](telekom)
host=217.0.23.134


[DTAG-IP_IN23_135](telekom)
host=217.0.23.135


[DTAG-IP_IN23_136](telekom)
host=217.0.23.136


[DTAG-IP_IN23_137](telekom)
host=217.0.23.137


[DTAG-IP_IN23_138](telekom)
host=217.0.23.138


[DTAG-IP_IN23_139](telekom)
host=217.0.23.139


[DTAG-IP_IN23_140](telekom)
host=217.0.23.140


[DTAG-IP_IN23_164](telekom)
host=217.0.23.164


[DTAG-IP_IN23_165](telekom)
host=217.0.23.165


[DTAG-IP_IN23_166](telekom)
host=217.0.23.166


[DTAG-IP_IN23_167](telekom)
host=217.0.23.167


[DTAG-IP_IN23_168](telekom)
host=217.0.23.168


[DTAG-IP_IN23_169](telekom)
host=217.0.23.169


[DTAG-IP_IN23_170](telekom)
host=217.0.23.170


[DTAG-IP_IN23_171](telekom)
host=217.0.23.171


[DTAG-IP_IN23_172](telekom)
host=217.0.23.172


[DTAG-IP_IN23_196](telekom)
host=217.0.23.196


[DTAG-IP_IN23_197](telekom)
host=217.0.23.197


[DTAG-IP_IN23_198](telekom)
host=217.0.23.198


[DTAG-IP_IN23_199](telekom)
host=217.0.23.199


[DTAG-IP_IN23_200](telekom)
host=217.0.23.200


[DTAG-IP_IN23_201](telekom)
host=217.0.23.201


[DTAG-IP_IN23_202](telekom)
host=217.0.23.202


[DTAG-IP_IN23_203](telekom)
host=217.0.23.203


[DTAG-IP_IN23_204](telekom)
host=217.0.23.204


[DTAG-IP_IN23_228](telekom)
host=217.0.23.228


[DTAG-IP_IN23_229](telekom)
host=217.0.23.229


[DTAG-IP_IN23_230](telekom)
host=217.0.23.230


[DTAG-IP_IN23_231](telekom)
host=217.0.23.231


[DTAG-IP_IN23_232](telekom)
host=217.0.23.232


[DTAG-IP_IN23_233](telekom)
host=217.0.23.233


[DTAG-IP_IN23_234](telekom)
host=217.0.23.234


[DTAG-IP_IN23_235](telekom)
host=217.0.23.235


[DTAG-IP_IN23_236](telekom)
host=217.0.23.236
 
Zuletzt bearbeitet:
Warum nicht einfach host=dynamic und Verbindungen zu Port 5060 (via Firewall) auf einen Bereich einschränken, sagen wir 217.0.16.0/20 (217.0.16.0 - 217.0.31.255) oder 217.0.16.0/21 (217.0.16.0 - 217.0.23.255)? Das ist doch verhältnismäßiger als ständig IPs nach zu tragen und Anrufe zu verpassen.
 
host=dynamic hat damit nichts zu tun, allowguest=no darf nicht gesetzt sein.

Das dürfte aber mittlerweile hinreichend bekannt sein und ist nicht das Thema hier.
 
Ähh, vllt ne' blöde Frage, aber kann man nicht auch einfach "t-ipnet.de" als host setzen, und gut ist?
 
Kann man nicht, denn "t-ipnet.de" hat keine IP und die ganzen Subdomains werden doch ignoriert. In "host" kann genau eine IP eingetragen werden - egal, ob über IP direkt oder einen Hostname.

Aber man könnte das "trustrpid=no" mit in den Kontext "telekom" packen und so noch ein paar Zeilen sparen.
 
Danke für den Tipp. Ich habe nochmal den Code vom ersten Post überarbeitet. Noch irgendwelche Anregungen zur Optimierung?
 
Kann man nicht, denn "t-ipnet.de" hat keine IP und die ganzen Subdomains werden doch ignoriert. In "host" kann genau eine IP eingetragen werden - egal, ob über IP direkt oder einen Hostname.

Ok, praktisch ist es dann im Asterisk (noch) nicht als Feature implementiert. Aber grundsätzlich brigt ein DNS lookup auf eine beliebige der Telekom IP's der Liste ja ein Ergebiss in Form von <subdomain>.t-ipnet.de

Es wäre dann ja ein Feature in Form von
Code:
host=*.t-ipnet.de
als sip.conf Parameter denkbar? Macht das Sinn? Lässt sich coden.
 
Wäre denkbar und sinnvoll, wird aber nunmal leider nicht von Asterisk unterstützt.

Prima wäre auch ein "host=217.0.16.0/20" - wird aber leider alles nicht unterstützt.
 
host=dynamic hat damit nichts zu tun, allowguest=no darf nicht gesetzt sein.
Kann man das nicht auf 'no' belassen wenn hosts=dynamic und insecure=invite gesetzt sind?

Ansonsten allowguest=yes und drop außerhalb 217.0.16.0/20.
 
Grundsätzlich könnte man das mit einem AGI (inbound_provider.agi) machen (hier unter Benutzung des phpagi-Frameworks):

PHP:
#!/usr/bin/php -q
<?php
include_once("/etc/asterisk/agi_params.php");

$source=$argv[1];

/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {

        if ( strpos( $range, '/' ) == false ) {
                $range .= '/32';
        }

        // $range is in IP/CIDR format eg 127.0.0.1/24
        list( $range, $netmask ) = explode( '/', $range, 2 );
        $range_decimal = ip2long( $range );
        $ip_decimal = ip2long( $ip );
        $wildcard_decimal = pow( 2, ( 32 - $netmask ) ) - 1;
        $netmask_decimal = ~ $wildcard_decimal;
        return ( ( $ip_decimal & $netmask_decimal ) == ( $range_decimal & $netmask_decimal ) );
}

require('phpagi/phpagi.php');
$agi = new AGI();
$agi->verbose("Beginne Identifizierung für $source",4);
$found=FALSE;

foreach ($provider as $key => $value) {
        foreach ($provider[$key] as $range) {
                if (ip_in_range($source,$range)) {
                        $agi->verbose("Identifiziert als $key",4);
                        $agi->set_variable('Provider',$key);
                        $found=TRUE;
                        break:
                }
        }
        if ($found) {
              break;
        }
}

?>

Dabei enthält /etc/asterisk/agi_params.php hier die Konfiguration unserer Provider mit deren IP-Range, also für die DTAG und 1und1 etwa:

PHP:
<?php
//Provider-IP-Listings

$provider['DTAG-IP']=array('217.0.16.0/20');
$provider['1und1']=array('212.227.18.0/24','212.227.67.0/24');

?>

Jetzt kann man im Asterisk (im Context aus dem sip.conf-General-Abschnitt (also üblicherweise default) folgendes einbauen:

Code:
exten => _X!,1,Verbose(Unbekannter Anruf ohne Providerzuordnung)
exten => _X!,n,AGI(inbound_provider.agi,${CHANNEL(peerip)})
exten => _X!,n,GotoIf($[${ISNULL(${Provider})}=0]?meinkontext,1)
exten => _X!,n,Verbose(Provider nicht identifiziert, lege auf)
exten => _X!,n,Hangup(17)

Vorausgesetzt, man setzt allowguest=yes in seiner sip.conf, könnte man sich dergesetalt die einzelnen Hosts für Provider mit Loadbalancing schenken, sobald man deren IP-Ranges kennt und entsprechend konfiguriert.
 
Zuletzt bearbeitet:
So lange der default Context ausschließlich die eigenen Telefonnummern enthält, laufen die üblichen "Angriffe" a la INVITE:sau-teure-Auslandsnummer@zufällig.meine.adresse doch mit einem 404 ins Leere.

Wenn jemand die Kombination aus meiner Telefonnummer und meiner IP-Adresse kennt, kann er damit maximal mich anrufen.

Wie machen die handelsüblichen DSL Router mit VoIP Funktion das eigentlich? Ich kann mir nicht vorstellen, dass da per Firmware- oder sonstigem Update immer alle neuen Load Balancer sämtlicher Provider eingetragen werden. Das höchste der Gefühle wäre noch die Übereinstimmung des Hostnamen als Domain in einem der SIP Header.

Die Sperre (DROP) per vorgelagerter Firewall schützt vor Portscans und echten Hackerangriffen, und ist damit imho der einzig wirklich sinnvolle Schutz.
 

Zurzeit aktive Besucher

Statistik des Forums

Themen
244,992
Beiträge
2,222,342
Mitglieder
371,771
Neuestes Mitglied
Drago123
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.