[Gelöst]ENUM mit * und Variable

Timmbo

Aktives Mitglied
Mitglied seit
6 Nov 2005
Beiträge
1,935
Punkte für Reaktionen
0
Punkte
0
Hallo.


Mein Asterisk macht ENUM Abfragen, die eigentlich gut funktionieren, jedoch ist mir heute aufgefallen, dass wenn ich die RTR anrufe die Zentrale zwar einen ENUM Eintrag hat, jedoch dieser bei mir nicht funktioniert.
Ein Anruf bei der RTR hat dann ergeben das die Kopfnummer(Zentrale) mit einer sogenannten Variable arbeitet, denn die DW gehen ja problemlos.
Ist jemandem von Euch dieses problem bekannt?

Ich verwende 1.2.20.

Danke für Eure Hilfe.


Timm
 
Zuletzt bearbeitet:
Kannst Du mal posten wie der Eintrag mit der Variablen aussehen soll, habe da keine Vorstellung.

Gruß

Martin
 
Hi swatchy,


wenn ich das wüsste.
Der jetzige schaut so aus:(damit geht es eben nicht)

exten => _Z.,1,Set(CALLERID(number)=0043720${Nebenstelle})
exten => _Z.,n,Set(enumlist=e164.arpa e164.org e164.info|tree=0)
exten => _Z.,n,While($["${SET(e164=${CUT(enumlist, ,${SET(tree=$[${tree} + 1])})})}" != ""])
exten => _Z.,n,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c,${e164})}|counter=0)
exten => _Z.,n,While($[${counter}<0${sipcount}])
exten => _Z.,n,Set(counter=$[${counter}+1])
exten => _Z.,n,Gotoif($["${SET(e=${ENUMLOOKUP(+${EXTEN},sip,${counter},${e164})})}"=""]?ew)
exten => _Z.,n,Dial(SIP/${e},120)
exten => _Z.,n(ew),EndWhile
exten => _Z.,n,EndWhile
exten => _Z.,n,GotoIf($["${DIALSTATUS}"=""]?ef)
exten => _Z.,n,Noop(${DIALSTATUS})
exten => _Z.,n,Congestion()
exten => _Z.,n,Hangup
exten => _Z.,n(ef),goto(enum-lcr,00${EXTEN},1)

Thx
Timm
 
Dann geh doch mal auf die Seite (http://www.naptr.org/) und gebe dort die Nummer in das Abfragefeld. Dann solltest Du doch sehen können wie der Eintrag ausschaut. Brauchst ihn ja hier nicht zu Posten, aber damit könntest Du bestimmt selbst recht gut den Fehler finden können.

Gruß

Martin
 
Hi swatchy,


der Eintrag schaut so aus:

"E2U+sip" "!^.*$!sip:[email protected]!"

Ich bin darin nicht der megaprofi,

Der geht:
"E2U+sip" "!^\\+43158058(.+)$!sip:\\[email protected]!"
un der auch
"E2U+sip" "!^.*$!sip:[email protected]!"

Ich verstehe es nicht.

Grüße
Timm
 
Hi,


ich habs jetzt mal direkt probiert, tatsächlich ist [email protected] nicht erreichbar, da ist es tot, aber warum?


Grüße
Timm
 
Das Beste ist Du machst mal ein Log, indem Du auf der CLI " sip set debug " schreibst und dann nochmal direkt probierst. Außerdem ein gesetztes " set verbose 4 " auch noch hilfreich.
Und dann den Anruf mal postest.

Gruß

Martin
 
Hi, hier mein Debug:


--- (12 headers 0 lines) ---
-- Executing Set("SIP/52-b7400018", "sipcount=1|counter=0") in new stack
-- Executing While("SIP/52-b7400018", "1") in new stack
-- Executing Set("SIP/52-b7400018", "counter=1") in new stack
-- Executing GotoIf("SIP/52-b7400018", "0?ew") in new stack
-- Executing Playback("SIP/52-b7400018", "/mnt/kd/accessvoip/sounds/moo") in new stack
We're at 192.168.0.5 port 10228
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x10 (g726) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.0.12:1025:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.12:1025;branch=z9hG4bK-vnlixpuullxl;received=192.168.0.12;rport=1024
From: "Timm" <sip:[email protected]>;tag=sny4146e2r
To: <sip:[email protected]>;tag=as2d6e5e31
Call-ID: 3c268b32523b-gnm09ivnakrd
CSeq: 2 INVITE
User-Agent: Vlines accessVoIP
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 288

v=0
o=root 24898 24898 IN IP4 192.168.0.5
s=session
c=IN IP4 192.168.0.5
t=0 0
m=audio 10228 RTP/AVP 8 0 2 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:eek:ff - - - -

---
-- Playing '/mnt/kd/accessvoip/sounds/moo' (language 'de')
accessvoip*CLI>
<-- SIP read from 192.168.0.12:1024:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.0.12:1025;branch=z9hG4bK-atn5rqq35smk;rport
From: "Timm" <sip:[email protected]>;tag=sny4146e2r
To: <sip:[email protected]>;tag=as2d6e5e31
Call-ID: 3c268b32523b-gnm09ivnakrd
CSeq: 2 ACK
Max-Forwards: 70
Contact: <sip:[email protected]:1025;line=kpvbz6bx>;flow-id=1
Content-Length: 0


--- (9 headers 0 lines) ---
-- Executing Dial("SIP/52-b7400018", "SIP/[email protected]|120") in new stack
-- parse_srv: SRV mapped to host gw.voip.rtr.at, port 5060
We're at 85.126.111.210 port 10406
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x10 (g726) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
13 headers, 13 lines
Reliably Transmitting (no NAT) to 81.16.149.189:5060:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 85.126.111.210:5060;branch=z9hG4bK1b370858;rport
From: "Timm" <sip:[email protected]>;tag=as3918c12e
To: <sip:[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: Vlines accessVoIP
Max-Forwards: 70
Date: Fri, 21 Sep 2007 10:59:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 298

v=0
o=root 24898 24898 IN IP4 85.126.111.210
s=session
c=IN IP4 85.126.111.210
t=0 0
m=audio 10406 RTP/AVP 8 0 111 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:eek:ff - - - -

---
-- Called [email protected]
accessvoip*CLI>
<-- SIP read from 81.16.157.165:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 85.126.111.210:5060;branch=z9hG4bK1b370858;received=85.126.111.210;rport=5060
From: "Timm" <sip:[email protected]>;tag=as3918c12e
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0


--- (11 headers 0 lines) ---
accessvoip*CLI>
<-- SIP read from 192.168.0.12:1024:
BYE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.0.12:1025;branch=z9hG4bK-iljorou6bz98;rport
From: "Timm" <sip:[email protected]>;tag=sny4146e2r
To: <sip:[email protected]>;tag=as2d6e5e31
Call-ID: 3c268b32523b-gnm09ivnakrd
CSeq: 3 BYE
Max-Forwards: 70
Contact: <sip:[email protected]:1025;line=kpvbz6bx>;flow-id=1
User-Agent: snom370/7.1.19
RTP-RxStat: Total_Rx_Pkts=86,Rx_Pkts=86,Rx_Pkts_Lost=0,Remote_Rx_Pkts_Lost=0
RTP-TxStat: Total_Tx_Pkts=212,Tx_Pkts=212,Remote_Tx_Pkts=0
Content-Length: 0


--- (12 headers 0 lines) ---
Sending to 192.168.0.12 : 1025 (NAT)
Transmitting (NAT) to 192.168.0.12:1024:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.12:1025;branch=z9hG4bK-iljorou6bz98;received=192.168.0.12;rport=1024
From: "Timm" <sip:[email protected]>;tag=sny4146e2r
To: <sip:[email protected]>;tag=as2d6e5e31
Call-ID: 3c268b32523b-gnm09ivnakrd
CSeq: 3 BYE
User-Agent: Vlines accessVoIP
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:[email protected]>
Content-Length: 0


---
Scheduling destruction of call '[email protected]' in 32000 ms
Reliably Transmitting (no NAT) to 81.16.149.189:5060:
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 85.126.111.210:5060;branch=z9hG4bK1b370858;rport
From: "Timm" <sip:[email protected]>;tag=as3918c12e
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 CANCEL
User-Agent: Vlines accessVoIP
Max-Forwards: 70
Content-Length: 0


---
== Spawn extension (enum, 431580580, 9) exited non-zero on 'SIP/52-b7400018'
accessvoip*CLI>
<-- SIP read from 81.16.157.165:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 85.126.111.210:5060;branch=z9hG4bK1b370858;received=85.126.111.210;rport=5060
From: "Timm" <sip:[email protected]>;tag=as3918c12e
To: <sip:[email protected]>;tag=as54bbe226
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


--- (10 headers 0 lines) ---
Transmitting (no NAT) to 81.16.149.189:5060:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 85.126.111.210:5060;branch=z9hG4bK1b370858;rport
From: "Timm" <sip:[email protected]>;tag=as3918c12e
To: <sip:[email protected]>;tag=as54bbe226
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: Vlines accessVoIP
Max-Forwards: 70
Content-Length: 0


---

<-- SIP read from 81.16.157.165:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 85.126.111.210:5060;branch=z9hG4bK1b370858;received=85.126.111.210;rport=5060
From: "Timm" <sip:[email protected]>;tag=as3918c12e
To: <sip:[email protected]>;tag=as54bbe226
Call-ID: [email protected]
CSeq: 102 CANCEL
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0

Thx
Timm
 
Was sind denn die Nummern:
01580580
004372050107852

Bin ich recht der Annahme, dass die IP Adressen wie folgt aufgeteilt sind:
192.168.0.5 - Dein PC
192.168.0.12 - Asterisk

Gruß

Martin

Achso, bitte das nächste mal die Ausgabe in " code " packen, damit es besser zu lesen ist, danke!
 
Also wenn ich das ganze mache, dann sieht das so aus:
extensions.conf
Code:
exten => 111,1,Dial(SIP/[email protected])

Rufe dabei vom iax2 client (ist auf der IP 127.0.0.1) mit der Nummer 10 über Asterisk (192.168.123.1) die Nummer 111 an:
Code:
    -- Accepting AUTHENTICATED call from 127.0.0.1:
       > requested format = gsm,
       > requested prefs = (),
       > actual format = gsm,
       > host prefs = (gsm),
       > priority = mine
    -- Executing [111@brd:1] Dial("IAX2/10-1", "SIP/[email protected]") in new stack
    -- parse_srv: SRV mapped to host gw.voip.rtr.at, port 5060
Video is at 83.135.5.30 port 12344
Audio is at 83.135.5.30 port 16964
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x10 (g726aal2) to SDP
Adding codec 0x20 (adpcm) to SDP
Adding codec 0x40 (slin) to SDP
Adding codec 0x80 (lpc10) to SDP
Adding codec 0x200 (speex) to SDP
Adding codec 0x400 (ilbc) to SDP
Adding codec 0x800 (g726) to SDP
Adding codec 0x10000 (jpeg) to SDP
Adding codec 0x20000 (png) to SDP
Adding codec 0x40000 (h261) to SDP
Adding codec 0x80000 (h263) to SDP
Adding codec 0x100000 (h263p) to SDP
Adding codec 0x200000 (h264) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 81.16.149.189:5060:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;rport
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: Asterisk
Max-Forwards: 70
Date: Fri, 21 Sep 2007 11:34:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 656

v=0
o=root 5419 5419 IN IP4 83.135.5.30
s=session
c=IN IP4 83.135.5.30
b=CT:384
t=0 0
m=audio 16964 RTP/AVP 3 0 8 112 5 10 7 110 97 111 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:10 L16/8000
a=rtpmap:7 LPC/8000
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
m=video 12344 RTP/AVP 26 31 34 103 99
a=rtpmap:26 JPEG/90000
a=rtpmap:31 H261/90000
a=rtpmap:34 H263/90000
a=rtpmap:103 h263-1998/90000
a=rtpmap:99 H264/90000
a=sendrecv

---
    -- Called [email protected]
sauger*CLI>
<--- SIP read from 81.16.157.165:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;received=83.135.5.30;rport=61000
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
sauger*CLI>
<--- SIP read from 81.16.157.165:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;received=83.135.5.30;rport=61000
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>;tag=as3e2a8d63
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
    -- SIP/rtr.at-0822d328 is ringing
Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
Reliably Transmitting (NAT) to 81.16.157.165:5060:
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;rport
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 CANCEL
User-Agent: Asterisk
Max-Forwards: 70
Content-Length: 0


---
Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
  == Spawn extension (brd, 111, 1) exited non-zero on 'IAX2/10-1'
    -- Hungup 'IAX2/10-1'
sauger*CLI>
<--- SIP read from 81.16.157.165:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;received=83.135.5.30;rport=61000
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>;tag=as3e2a8d63
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
Transmitting (NAT) to 81.16.157.165:5060:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;rport
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>;tag=as3e2a8d63
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: Asterisk
Max-Forwards: 70
Content-Length: 0


---
sauger*CLI>
<--- SIP read from 81.16.157.165:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 83.135.5.30:5060;branch=z9hG4bK6465ebaa;received=83.135.5.30;rport=61000
From: "Martin" <sip:[email protected]>;tag=as775d544e
To: <sip:[email protected]>;tag=as3e2a8d63
Call-ID: [email protected]
CSeq: 102 CANCEL
User-Agent: VoIP RTR srv1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog '[email protected]' Method: INVITE

Was mich bei Dir stört ist, dass er sagt dass Du kein NAT verwendest, siehe:
Code:
Reliably Transmitting (no NAT) to 81.16.149.189:5060:

Bei der IP Adresse von 192.168.0.5 -> 81.16.149.189 ist aber auf jeden Fall NAT notwendig!

Gruß

Martin
 
Hi,


das mit dem code und Zitat habe ich keine Ahnung wie das geht, finde keine option hier.
Nein es ist umgekehrt 12=Snom 5=Asterisk.
Die 01580580 ist die PSTN-Rufnummer der RTR, die andere meine.

Das ist klar das da NAT im spiel ist, aber das macht ja mein Router, ich
weiß nicht warum * da ein NAT machen sollte?
Es ist ja kein NAT irgendwo definiert.


Grüße
Timm
 
Timmbo schrieb:
das mit dem code und Zitat habe ich keine Ahnung wie das geht, finde keine option hier.
Du bist doch schon so lange dabei...
Verwende [noparse]
Code:
...
bzw.
[/noparse] oder die entsprechenden Buttons oben im "erweiterten Editor":
code.gif
,
quote.gif
.


Gruß,
Wichard
 
Hi wichard,


ja ich weiß aber bei mir gibt es kein erweiterten Editor, habe schon oft gesucht und mir war das peinlich zu fragen.
Muß der vorher "freigeschaltet" werden?

Übrigends, das mit ENUM geht jetzt, es ist nur so das die RTR ein reinvite durch einen SRV-Eintrag bei der 0 auslöst und deshalb dauert es 13sek bis der Call steht.

Update: jetzt hab ichs, ich hatte den "Einfachen Editor" bei mir in den Einstellungen, da kann ich ja nichts finden.


Dane & Grüße
Timm
 
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.