GELÖST ! -> sipsnip & asterisk

betateilchen

Grandstream-Guru
Mitglied seit
30 Jun 2004
Beiträge
12,882
Punkte für Reaktionen
0
Punkte
0
Hat schon jemand sipsnip mit Asterisk zum Laufen bekommen ?

Bei mir funktioniert die Registrierung meines Asterisk problemlos

Auch abgehend kann ich jede ENUM-registrierte Telefonnummer erreichen (Prima !)

Aber sobald es eine "normale" Telefonnummer betrifft, bekomme ich eine merkwürdige "Authenticate Failure" Meldung
Code:
    -- Executing SetCallerID("SIP/70-2ca9", "monsterhase65") in new stack
    -- Executing SetCIDName("SIP/70-2ca9", "monsterhase65") in new stack
    -- Executing Dial("SIP/70-2ca9", "SIP/[email protected]|30|r") in new stack
    -- parse_srv: SRV mapped to host sipsnip.com, port 5060
    -- Called [email][email protected][/email]

Aug 11 21:50:03 NOTICE[4101]: chan_sip.c:5047 handle_response: Failed to authenticate on INVITE to '"monsterhase65" <sip:[email protected]>;tag=as5a48d32d'
 
Um mal konkreter zu fragen

1.) wieso gibt es ein INVITE mit einer Caller-ID (selbst wenn keine gesetzt wird - dann wird versucht, die Extension meines ATA an meinem Asterisk zu authentifizieren)

2.) wieso tritt dieser Fehler nur auf, wenn es um Telefonnummern außerhalb von ENUM geht ?

SIP-Trace

Code:
uneu*CLI> sip debug
SIP Debugging Enabled
uneu*CLI>

Sip read:
INVITE sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bK4ea1f6981249f975
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 33612 INVITE
User-Agent: Grandstream HT486 1.0.5.10
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Type: application/sdp
Content-Length: 315

v=0
o=70 8000 8000 IN IP4 213.54.212.41
s=SIP Call
c=IN IP4 213.54.212.41
t=0 0
m=audio 5004 RTP/AVP 98 0 8 18 2 15 4
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:15 G728/8000
a=rtpmap:4 G723/8000
a=ptime:40

12 headers, 15 lines
Using latest request as basis request
Sending to 213.54.212.41 : 5060 (non-NAT)
Found audio format UNKN
Found audio format UNKN
Found audio format ALAW
Found audio format UNKN
Found audio format GSM
Found audio format UNKN
Found audio format ULAW
Found description format iLBC
Found description format PCMU
Found description format PCMA
Found description format G729
Found description format G726-32
Found description format G728
Found description format G723
Capabilities: us - 1030, them - 1309/0, combined - 1028
Non-codec capabilities: us - 1, them - 0, combined - 0
Reliably Transmitting (no NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bK4ea1f6981249f975
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as1f32ff34
Call-ID: [email protected]
CSeq: 33612 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:*[email protected]>
Proxy-Authenticate: Digest realm="asterisk", nonce="167fb37c"
Content-Length: 0


 to 213.54.212.41:5060
uneu*CLI>

Sip read:
ACK sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bK4ea1f6981249f975
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as1f32ff34
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 33612 ACK
User-Agent: Grandstream HT486 1.0.5.10
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Length: 0


11 headers, 0 lines
uneu*CLI>

Sip read:
INVITE sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>
Contact: <sip:[email protected]>
Proxy-Authorization: DIGEST username="70", realm="asterisk", algorithm=MD5, uri="sip:*[email protected]", nonce="167fb37c", response="7d1230084e80137e910e0171a53be6e2"
Call-ID: [email protected]
CSeq: 33613 INVITE
User-Agent: Grandstream HT486 1.0.5.10
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Type: application/sdp
Content-Length: 315

v=0
o=70 8000 8000 IN IP4 213.54.212.41
s=SIP Call
c=IN IP4 213.54.212.41
t=0 0
m=audio 5004 RTP/AVP 98 0 8 18 2 15 4
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:15 G728/8000
a=rtpmap:4 G723/8000
a=ptime:40

13 headers, 15 lines
Using latest request as basis request
Sending to 213.54.212.41 : 5060 (non-NAT)
Found audio format UNKN
Found audio format UNKN
Found audio format ALAW
Found audio format UNKN
Found audio format GSM
Found audio format UNKN
Found audio format ULAW
Found description format iLBC
Found description format PCMU
Found description format PCMA
Found description format G729
Found description format G726-32
Found description format G728
Found description format G723
Capabilities: us - 1030, them - 1309/0, combined - 1028
Non-codec capabilities: us - 1, them - 0, combined - 0
Looking for *203416894937 in monsterhase
list_route: hop: <sip:[email protected]>
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as0f6499c0
Call-ID: [email protected]
CSeq: 33613 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:*[email protected]>
Content-Length: 0


 to 213.54.212.41:5060
    -- parse_srv: SRV mapped to host sipsnip.com, port 5060
We're at 217.20.120.121 port 14588
Answering with preferred capability 2
Answering with preferred capability 4
Answering with preferred capability 1024
Answering with non-codec capability 1
12 headers, 12 lines
Reliably Transmitting:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 217.20.120.121:5060;branch=z9hG4bK2dcc351e
From: "70" <sip:[email protected]>;tag=as0c8f41f4
To: <sip:[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Wed, 11 Aug 2004 20:03:57 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 269

v=0
o=root 15602 15602 IN IP4 217.20.120.121
s=session
c=IN IP4 217.20.120.121
t=0 0
m=audio 14588 RTP/AVP 3 0 97 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
 (no NAT) to 217.160.220.106:5060
Transmitting (no NAT):
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as0f6499c0
Call-ID: [email protected]
CSeq: 33613 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:*[email protected]>
Content-Length: 0


 to 213.54.212.41:5060
uneu*CLI>

Sip read:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 217.20.120.121:5060;branch=z9hG4bK2dcc351e
From: "70" <sip:[email protected]>;tag=as0c8f41f4
To: <sip:[email protected]>;tag=4dbcba0cb490d1ab41a8995211c1ac07.0bf1
Call-ID: [email protected]
CSeq: 102 INVITE
WWW-Authenticate: Digest realm="sipsnip.com", nonce="411a7cd034b9d20302cab2f5f53095558e959a26"
Server: Sip EXpress router (0.8.12-1rc1 (i386/linux))
Content-Length: 0
Warning: 392 sipsnip.com:5060 "Noisy feedback tells:  pid=4453 req_src_ip=217.20.120.121 req_src_port=5060 in_uri=sip:[email protected] out_uri=sip:[email protected] via_cnt==1"


10 headers, 0 lines
Transmitting:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 217.20.120.121:5060;branch=z9hG4bK2dcc351e
From: "70" <sip:[email protected]>;tag=as0c8f41f4
To: <sip:[email protected]>;tag=4dbcba0cb490d1ab41a8995211c1ac07.0bf1
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0

 (no NAT) to 217.160.220.106:5060
Aug 11 22:03:57 NOTICE[4101]: chan_sip.c:5047 handle_response: Failed to authenticate on INVITE to '"70" <sip:[email protected]>;tag=as0c8f41f4'
uneu*CLI>

Sip read:
CANCEL sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>
Contact: <sip:[email protected]>
Proxy-Authorization: DIGEST username="70", realm="asterisk", algorithm=MD5, uri="sip:*[email protected]", nonce="167fb37c", response="cd3ffa35f90e2f53b3b17f05c3757ada"
Call-ID: [email protected]
CSeq: 33613 CANCEL
User-Agent: Grandstream HT486 1.0.5.10
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Length: 0


12 headers, 0 lines
Sending to 213.54.212.41 : 5060 (non-NAT)
Reliably Transmitting (no NAT):
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as0f6499c0
Call-ID: [email protected]
CSeq: 33613 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:*[email protected]>
Content-Length: 0


 to 213.54.212.41:5060
Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as0f6499c0
Call-ID: [email protected]
CSeq: 33613 CANCEL
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:*[email protected]>
Content-Length: 0


 to 213.54.212.41:5060
uneu*CLI>

Sip read:
ACK sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bKfc13585f805afee6
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as0f6499c0
Contact: <sip:[email protected]>
Proxy-Authorization: DIGEST username="70", realm="asterisk", algorithm=MD5, uri="sip:*[email protected]", nonce="167fb37c", response="cd3ffa35f90e2f53b3b17f05c3757ada"
Call-ID: [email protected]
CSeq: 33613 ACK
User-Agent: Grandstream HT486 1.0.5.10
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Length: 0


12 headers, 0 lines
uneu*CLI>

Sip read:
ACK sip:*[email protected] SIP/2.0
Via: SIP/2.0/UDP 213.54.212.41;branch=z9hG4bK3431ed5367c8b005
From: <sip:[email protected]>;tag=6c6f475c9ca1ec8a
To: <sip:*[email protected]>;tag=as0f6499c0
Contact: <sip:[email protected]>
Proxy-Authorization: DIGEST username="70", realm="asterisk", algorithm=MD5, uri="sip:*[email protected]", nonce="167fb37c", response="6268cb311dd5afdf7c4d1a2b341f20b1"
Call-ID: [email protected]
CSeq: 33613 ACK
User-Agent: Grandstream HT486 1.0.5.10
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Content-Length: 0


12 headers, 0 lines
 
sipsnip fordert deine Asterisk zur Credential Challenge auf. Leider mit 401 statt mit 407. 401 Wird ueblicherweise nur bei REGISTERs benutzt und nicht bei INVITES. Evtl. hat die Asterisk damit ein Problem.

Warum 401 statt 407 kommt kann ich nur vermuten. Und zwar steht im From-Header "70" statt deine Account Kennung die du bei SS zur Authenfizierung benutzt. Du kannst das ueber sip.conf machen, und zwar muss in der Area fuer den Account "fromheader=<account>" eingesetzt werden.
 
Danke für die Hilfe.

70 ist die Extension meines ATA an meinem Asterisk.
Habe gerade den Eintrag mit dem "fromheader" probiert, das hat an der Meldung

chan_sip.c:5047 handle_response: Failed to authenticate on INVITE to '"70" <sip:[email protected]>;tag=as6463368d'

keine Änderung bewirkt :-(
 
Code:
NOTICE[4101]: chan_sip.c:5047 handle_response: Failed to authenticate on INVITE to '"70" <sip:[email protected]>;tag=as033e1a45'

und das ist definitv meine Benutzerkennung bei sipsnip - naja, mal sehen was der "Hamburger Bill Gates" dazu sagt :D

Danke für die Unterstützung & schönen Abend !

Ich werde weiter berichten.

---------------------------------

Es gibt Neuigkeiten !

Die Infos bzgl. der 401/407 Geschichte habe ich mal weitergeleitet.

Antwort von sipsnip:

Das haben wir heute bereits umgestellt. Nach SIP RFC3261 ist beides möglich,
aber nicht alle Produkte kommen damit zurecht.
Tritt das Problem jetzt immer noch auf?

Mit freundlichen Grüßen,
Henrik Pfluger

Also - gleich mal ausprobiert, und siehe da: Asterisk VERSUCHT jetzt wenigstens, eine Verbindung aufzubauen !

Aber:
Code:
    -- Executing Dial("SIP/70-6719", "SIP/03416894937@sipsnip|30|r") in new stack
    -- Called 03416894937@sipsnip
    -- SIP/sipsnip-d228 is ringing
    -- SIP/sipsnip-d228 is making progress passing it to SIP/70-6719
    -- SIP/sipsnip-d228 answered SIP/70-6719
    -- Attempting native bridge of SIP/70-6719 and SIP/sipsnip-d228
    -- Got SIP response 400 "Request cannot be handled at this time" back from 217.160.220.106

Naja - wieder weitergeleitet :) bin zuversichtlich, daß wir das Ganze noch zum Laufen zu kriegen - die Antworten von sipsnip laufen auch jetzt - um 3 Uhr nachts - noch im 5-Minuten-Rhythmus ein.

Sobald ich eine funktionsfähige Asterisk-Konfig habe, werde ich die hier natürlich posten.
 
Gelöst ! SipSnip & Asterisk

So. Nach einigen schlaflosen Nächten, mehreren Kannen Kaffee, ca. 1 Mio emails mit Henrik Pfluger (danke für die Hilfe !) funktioniert nun auch Asterisk wie er soll.

Was letztendlich die Lösung der bestehenden Probleme brachte, war die Installation einer komplett neuen Asterisk-Version aus dem CVS, was ich heute nacht durchgeführt habe.

Das einzige was jetzt noch nicht funktioniert, ist die Anwahl von kostenlosen 0800-Nummern, obwohl ich in diesem Fall KEINE Fehlermeldung bekomme, es klingelt (wer weiß wo ?) und läuft irgendwann in den TimeOut.

Die beigefügten Code-Schnipsel sind nur RUMPF-Bauteile, mit denen aber mein Asterisk erstmal ohne Probleme zurechtkommt. Natürlich kann man da einiges "schöner" machen, aber es geht mir um das Wesentliche.

sip.conf
Code:
register => username:[email protected]/sipsnip

[sipsnip]
type=friend
username=username
fromuser=username
secret=passwort
context=sipsnip_in
host=sipsnip.com
fromdomain=sipsnip.com
insecure=very
reinvite=no
canreinvite=no
nat=no
allow=all

extensions.conf
Code:
[sipsnip_in]
exten => _.,1,Answer
exten => _.,2,Dial(SIP/70) ;70 ist die Nebenstelle die hier klingeln soll

;abgehend über sipsnip
exten => _.,1,Dial(SIP/${EXTEN}@sipsnip,30,Ttr)
 
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.