Browse code

pdb: new protocol between pdb_server and kama pdb module

Modified the communication protocol between the pdb clent <-> server such
that the server will give more feedback on scenarios like "pdb_id not found" or
"request number contains letters". New msg types or reply codes can be easily
added. Curent version of the protocol is 1 (0x01).
Also backwards compatibility is maintained when the first received byte is
different than the known versions (now, just 0x01).
Updated the http link for the get_carrier_germany script. Created a new perl
script to get german carrier id.
Updated doku (utils/pdbt/docs/network_protocol.txt).

added the perls script

Stefan Mititelu authored on 04/06/2015 08:34:19
Showing 1 changed files
... ...
@@ -23,14 +23,15 @@
23 23
 # the 'Bundesnetzagentur' and convert this into the format which the pdbt tool
24 24
 # understands.
25 25
 
26
-url="http://www.bundesnetzagentur.de/cln_1912/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/TechnischeNummern/Portierungskennung/VerzeichnisPortKenn_Basepage.html"
26
+#old_url="http://www.bundesnetzagentur.de/cln_1912/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/TechnischeNummern/Portierungskennung/VerzeichnisPortKenn_Basepage.html"
27
+url="http://www.bundesnetzagentur.de/cln_1421/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Nummerierung/Technische%20Nummern/Portierungskennungen/VerzeichnisPortKenn_Basepage.html?nn=268376#Inhalt"
27 28
 
28
-# fix LOCALE problem during filtering 
29
+# fix LOCALE problem during filtering
29 30
 export LANG="C"
30 31
 
31
-wget -O - "$url" | recode latin1..utf8 | sed 's/^*.Verzeichnis der Portierungskennungen//' | awk '/<tbody>/, /<\/tbody>/' | tr -d '\r' | tr '\n' '@' | sed 's/<\/table>.*$//' | sed 's/<\/tbody>.*$//'
32
+wget -O - "$url" | recode latin1..utf8 | sed 's/^*.Verzeichnis der Portierungskennungen//' | awk '/<tbody>/, /<\/tbody>/' | tr -d '\r' | tr '\n' '@' | sed 's/<\/table>.*$//' | sed 's/<\/tbody>.*$//' | awk -F "</td" -v RS="</tr" '{ gsub(/.*>/,"",$1) gsub(/.*>/,"",$2); if ( $1 != "") { printf "%s %s\n",$2,$1 } }'
32 33
 
33 34
 # probably also possible to use this:
34 35
 # http://www.bundesnetzagentur.de/cae/servlet/contentblob/156772/publicationFile/8492/KonsolidiertesVerzPortierungsk.zip
35 36
 # main page (for reference):
36
-# http://www.bundesnetzagentur.de/cln_1932/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/TechnischeNummern/Portierungskennung/KonsolidiertesVerzPortKenn_Basepage.html?nn=120380
37 37
\ No newline at end of file
38
+# http://www.bundesnetzagentur.de/cln_1932/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/TechnischeNummern/Portierungskennung/KonsolidiertesVerzPortKenn_Basepage.html?nn=120380
Browse code

all: updated FSF address in GPL text

Anthony Messina authored on 04/07/2014 09:36:37 • Daniel-Constantin Mierla committed on 04/07/2014 09:37:36
Showing 1 changed files
... ...
@@ -16,7 +16,7 @@
16 16
 #
17 17
 # You should have received a copy of the GNU General Public License 
18 18
 # along with this program; if not, write to the Free Software 
19
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20 20
 
21 21
 # Small helper script for germany:
22 22
 # Download the directory of german carrier names and the respective IDs from
Browse code

pdbt: add another possible data source for german carrier directory

Henning Westerholt authored on 20/10/2010 07:30:46
Showing 1 changed files
... ...
@@ -30,3 +30,7 @@ export LANG="C"
30 30
 
31 31
 wget -O - "$url" | recode latin1..utf8 | sed 's/^*.Verzeichnis der Portierungskennungen//' | awk '/<tbody>/, /<\/tbody>/' | tr -d '\r' | tr '\n' '@' | sed 's/<\/table>.*$//' | sed 's/<\/tbody>.*$//'
32 32
 
33
+# probably also possible to use this:
34
+# http://www.bundesnetzagentur.de/cae/servlet/contentblob/156772/publicationFile/8492/KonsolidiertesVerzPortierungsk.zip
35
+# main page (for reference):
36
+# http://www.bundesnetzagentur.de/cln_1932/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/TechnischeNummern/Portierungskennung/KonsolidiertesVerzPortKenn_Basepage.html?nn=120380
33 37
\ No newline at end of file
Browse code

pdbt: fix URL for german carrier names, filtering is not yet working completely

Henning Westerholt authored on 13/09/2010 17:12:36
Showing 1 changed files
... ...
@@ -23,9 +23,10 @@
23 23
 # the 'Bundesnetzagentur' and convert this into the format which the pdbt tool
24 24
 # understands.
25 25
 
26
-url="http://www.bundesnetzagentur.de/enid/Portierungskennung/Verzeichnis_1ct.html"
26
+url="http://www.bundesnetzagentur.de/cln_1912/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/TechnischeNummern/Portierungskennung/VerzeichnisPortKenn_Basepage.html"
27 27
 
28 28
 # fix LOCALE problem during filtering 
29 29
 export LANG="C"
30 30
 
31
-wget -O - "$url" | recode latin1..utf8 | tr -d '\r' | tr '\n' '@' | sed 's/^.*Firma//' | sed 's/<\/table>.*$//' | tr '@' '\n' | sed 's/<\/p>/@/' | sed 's/<\/td>/@/' | egrep -v "^ *<" | tr -d '\n' | sed 's/@ *@/@/g' | tr '@' '\n' | sed 's/  */ /g' | sed 's/^ *//' | tr '\n' '@' | sed 's/\([^@]*\)@\(D[0-9][0-9][0-9]\)[^@]*@/\2 \1@/g' | tr '@' '\n' | sed 's/\&nbsp\;/ /g' | sed 's/\&amp\;/\&/g' | sed 's/  */ /g' | egrep -v '^$'
31
+wget -O - "$url" | recode latin1..utf8 | sed 's/^*.Verzeichnis der Portierungskennungen//' | awk '/<tbody>/, /<\/tbody>/' | tr -d '\r' | tr '\n' '@' | sed 's/<\/table>.*$//' | sed 's/<\/tbody>.*$//'
32
+
Browse code

pdbt: add one helper script, protocol and input data documentation

Henning Westerholt authored on 10/09/2009 17:32:41
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,31 @@
1
+#!/bin/bash
2
+
3
+# Copyright (C) 2009 1&1 Internet AG
4
+#
5
+# This file is part of sip-router, a free SIP server.
6
+#
7
+# sip-router is free software; you can redistribute it and/or modify
8
+# it under the terms of the GNU General Public License as published by
9
+# the Free Software Foundation; either version 2 of the License, or
10
+# (at your option) any later version
11
+#
12
+# sip-router is distributed in the hope that it will be useful,
13
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+# GNU General Public License for more details.
16
+#
17
+# You should have received a copy of the GNU General Public License 
18
+# along with this program; if not, write to the Free Software 
19
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
+
21
+# Small helper script for germany:
22
+# Download the directory of german carrier names and the respective IDs from
23
+# the 'Bundesnetzagentur' and convert this into the format which the pdbt tool
24
+# understands.
25
+
26
+url="http://www.bundesnetzagentur.de/enid/Portierungskennung/Verzeichnis_1ct.html"
27
+
28
+# fix LOCALE problem during filtering 
29
+export LANG="C"
30
+
31
+wget -O - "$url" | recode latin1..utf8 | tr -d '\r' | tr '\n' '@' | sed 's/^.*Firma//' | sed 's/<\/table>.*$//' | tr '@' '\n' | sed 's/<\/p>/@/' | sed 's/<\/td>/@/' | egrep -v "^ *<" | tr -d '\n' | sed 's/@ *@/@/g' | tr '@' '\n' | sed 's/  */ /g' | sed 's/^ *//' | tr '\n' '@' | sed 's/\([^@]*\)@\(D[0-9][0-9][0-9]\)[^@]*@/\2 \1@/g' | tr '@' '\n' | sed 's/\&nbsp\;/ /g' | sed 's/\&amp\;/\&/g' | sed 's/  */ /g' | egrep -v '^$'