Asterisk beendet SIP-Verbindung nicht

Fuso

Neuer User
Mitglied seit
20 Nov 2008
Beiträge
11
Punkte für Reaktionen
0
Punkte
0
Hallo,

ich habe das Problem das Asterisk (SVN-branch-1.4-r157503) eine Festnetzverbindung nicht trennt wenn der interne SIP Teilnehmer (SNOM 320) auflegt. Als Anbieter habe ich 1&1. Raus und rein telefonieren klappt einwandfrei. Wenn der externe Anrufer auflegt wird alles ordnungsgemäß getrennt. Aus irgendeinem Grund versteht 1&1 das BYE Kommando nicht.

Hier meine Einstellungsdateien:

sip.conf:
Code:
[general]
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
language=de
externip=xxx.dyndns.org
localnet=192.168.110.0/255.255.255.0
qualify=no
disallow=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm
allow=slinear
nat=no
allowsubscribe = yes
notifyringing = yes
notifyhold = yes
limitonpeers = yes
externrefresh = 15

register => 4933xxxxxxxx:[email protected]/4933xxxxxxxx

[4933xxxxxxxx]
type=friend
username=4933xxxxxxxx
fromuser=4933xxxxxxxx
secret=xxxxxxxx
host=sip.1und1.de
fromdomain=sip.1und1.de
nat=yes
insecure=port,invite
caninvite=no
canreinvite=no

1und1_in_0]
type=friend
fromdomain=sipbalance0.1und1.de
host=sipbalance0.1und1.de
insecure=port,invite
nat=yes
context=ankommend
caninvite=no
canreinvite=no

[1und1_in_1]
type=friend
fromdomain=sipbalance1.1und1.de
host=sipbalance1.1und1.de
insecure=port,invite
nat=yes
context=ankommend
caninvite=no
canreinvite=no

[10]
callerid=Privat <10>
host=dynamic
domain=192.168.110.124
user=10
secret=1313
type=friend
mailbox=10
nat=no
caninvite=no
canreinvite=no
context=default
subscribecontext=default
call-limit = 10
callgroup = 2
pickupgroup = 2

[11]
callerid=Büro <11>
host=dynamic
domain=192.168.110.124
user=11
secret=7990
type=friend
mailbox=11
nat=no
caninvite=no
canreinvite=no
context=default
subscribecontext=default
call-limit = 10
callgroup = 2
pickupgroup = 2

[12]
callerid=Büro Handy <12>
host=dynamic
domain=192.168.110.124
user=12
secret=7990
type=friend
mailbox=11
vmexten=11
nat=no
caninvite=no
canreinvite=no
context=default
subscribecontext=default
call-limit = 10
callgroup = 2
pickupgroup = 2

extensions.conf:
Code:
[general]
static=yes
writeprotect=no

[echotest]
exten => 81,1,answer
exten => 81,2,wait(1)
exten => 81,3,playback(demo-echotest)
exten => 81,4,echo
exten => 81,5,playback(demo-echodone)
exten => 81,6,hangup

[mailbox]
exten => 80,1,answer
exten => 80,n,wait(1)
exten => 80,n,voicemailmain
exten => 80,n,hangup

[mailbox_own]
exten => 88,1,answer
exten => 88,n,wait(1)
exten => 88,n,voicemailmain(s${CALLERID(num)})
exten => 88,n,hangup

exten => asterisk,1,VoicemailMain(s${CALLERID(num)})

[hear_music]
exten => 99,1,answer
exten => 99,n,wait(1)
exten => 99,n,musiconhold(mp3)

[lokal]
exten => 10,hint,SIP/10
exten => 10,1,Answer
exten => 10,n,Dial(SIP/10,55,Ttrm)
exten => 10,n,Voicemail(10,u)
exten => 11,n,Hangup

exten => 11,hint,SIP/11
exten => 11,1,Answer
exten => 11,n,Dial(SIP/11,55,Ttrm)
exten => 11,n,Voicemail(11,u)
exten => 11,n,Hangup

exten => 12,hint,SIP/12
exten => 12,1,Answer
exten => 12,n,Dial(SIP/12,55,Ttrm)
exten => 12,n,Voicemail(12,u)
exten => 12,n,Hangup

[1und1_out]
exten => _0.,1,Dial(SIP/${EXTEN:1}@4933xxxxxxxx,45,r)

[ankommend]
exten => 4933xxxxxxxx,1,NoOp(Anruf auf 1und1)
exten => 4933xxxxxxxx,n,Ringing
exten => 4933xxxxxxxx,n,Set(CALLERID(all)=1und1: ${CALLERID(num)} <${CALLERID(num)}>)
exten => 4933xxxxxxxx,n,Dial(SIP/11,30,t)
exten => 4933xxxxxxxx,n,Goto(r-${DIALSTATUS},1)

exten => r-CONGESTION,1,voicemail(11,u)
exten => r-CONGESTION,2,Hangup

exten => r-BUSY,1,voicemail(11,b)
exten => r-BUSY,2,Hangup

exten => r-NOANSWER,1,voicemail(11,u)
exten => r-NOANSWER,2,Hangup

exten => r-CHANUNAVAIL,1,voicemail(11,u)
exten => r-CHANUNAVAIL,2,Hangup

[default]
include => lokal
include => echotest
include => hear_music
include => mailbox
include => mailbox_own
include => 1und1_out

Log von CLI:
Code:
<--- Reliably Transmitting (NAT) to 212.227.15.231:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 212.227.15.231;branch=z9hG4bK85a9.e531208e7daea31d3d1b0b327c2918c1.0;received=212.227.15.231
Via: SIP/2.0/UDP 212.227.15.232;branch=z9hG4bK85a9.e531208e7daea31d3d1b0b327c2918c1.0
Via: SIP/2.0/UDP 212.227.15.231;branch=z9hG4bK85a9.aac91692.0
Via: SIP/2.0/UDP 195.71.47.146;branch=z9hG4bK85a9.aac91692.0
Via: SIP/2.0/UDP 1und1-8.sip.mgc.voip.telefonica.de:5060;received=193.189.245.140;branch=z9hG4bKterm-9d4279-+4933xxxxxxxx-+4933caller-18517
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.232;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:195.71.47.146;lr=on;ftag=132354529>
From: +4933caller <sip:[email protected]:5060;user=phone>;tag=132354529
To: +4933xxxxxxxx <sip:[email protected]:5060;user=phone>;tag=as74c859b8
Call-ID: e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 335

v=0
o=root 16489 16489 IN IP4 79.192.170.244
s=session
c=IN IP4 79.192.170.244
t=0 0
m=audio 19214 RTP/AVP 8 0 18 3 99
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:3 GSM/8000
a=rtpmap:99 telephone-event/8000
a=fmtp:99 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>

<--- SIP read from 212.227.15.231:5060 --->
ACK sip:[email protected]:5060 SIP/2.0
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.232;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:195.71.47.146;lr=on;ftag=132354529>
Via: SIP/2.0/UDP 212.227.15.231:5060;branch=z9hG4bK85a9.e531208e7daea31d3d1b0b327c2918c1.2
Via: SIP/2.0/UDP 212.227.15.232;branch=z9hG4bK85a9.e531208e7daea31d3d1b0b327c2918c1.2
Via: SIP/2.0/UDP 212.227.15.231;branch=z9hG4bK85a9.aac91692.2
Via: SIP/2.0/UDP 195.71.47.146;branch=z9hG4bK85a9.aac91692.2
Via: SIP/2.0/UDP 1und1-8.sip.mgc.voip.telefonica.de:5060;received=193.189.245.140;branch=z9hG4bKterm-9d4279-+4933xxxxxxxx-+4933caller-26028
From: +4933caller <sip:[email protected]:5060;user=phone>;tag=132354529
To: +4933xxxxxxxx <sip:[email protected]:5060;user=phone>;tag=as74c859b8
Call-ID: e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de
CSeq: 1 ACK
Max-Forwards: 15
Content-Length: 0
P-hint: rr-enforced


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

<--- SIP read from 192.168.110.60:2163 --->
BYE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.110.60:2163;branch=z9hG4bK-xhto2zbi6rzw;rport
From: <sip:[email protected]:2163;line=sjml8wz8>;tag=kuxokby3l2
To: "1und1: +4933caller" <sip:[email protected]>;tag=as333934b2
Call-ID: [email protected]
CSeq: 1 BYE
Max-Forwards: 70
Contact: <sip:[email protected]:2163;line=sjml8wz8>;flow-id=1
User-Agent: snom320/7.1.17
RTP-RxStat: Total_Rx_Pkts=234,Rx_Pkts=234,Rx_Pkts_Lost=0,Remote_Rx_Pkts_Lost=0
RTP-TxStat: Total_Tx_Pkts=248,Tx_Pkts=248,Remote_Tx_Pkts=0
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
Sending to 192.168.110.60 : 2163 (NAT)

<--- Transmitting (NAT) to 192.168.110.60:2163 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.110.60:2163;branch=z9hG4bK-xhto2zbi6rzw;received=192.168.110.60;rport=2163
From: <sip:[email protected]:2163;line=sjml8wz8>;tag=kuxokby3l2
To: "1und1: +4933caller" <sip:[email protected]>;tag=as333934b2
Call-ID: [email protected]
CSeq: 1 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0


<------------>
  == Spawn extension (ankommend, 4933xxxxxxxx, 4) exited non-zero on 'SIP/5060-081e0d08'
Scheduling destruction of SIP dialog 'e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de' in 32000 ms (Method: ACK)
set_destination: Parsing <sip:212.227.15.231;lr=on;ftag=132354529> for address/port to send to
set_destination: set destination to 212.227.15.231, port 5060
Reliably Transmitting (NAT) to 212.227.15.231:5060:
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 79.192.170.244:5060;branch=z9hG4bK7fda52bb;rport
Route: <sip:212.227.15.231;lr=on;ftag=132354529>,<sip:212.227.15.232;lr=on;ftag=132354529>,<sip:212.227.15.231;lr=on;ftag=132354529>,<sip:195.71.47.146;lr=on;ftag=132354529>
From: +4933xxxxxxxx <sip:[email protected]:5060;user=phone>;tag=as74c859b8
To: +4933caller <sip:[email protected]:5060;user=phone>;tag=132354529
Call-ID: e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de
CSeq: 102 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


---
Really destroying SIP dialog '[email protected]' Method: BYE

<--- SIP read from 212.227.15.231:5060 --->
SIP/2.0 400 Fehlerhafte SIP-Nachricht
Via: SIP/2.0/UDP 192.168.110.124:5060;branch=z9hG4bK7fda52bb;rport=5060
From: +4933xxxxxxxx <sip:[email protected]:5060;user=phone>;tag=as74c859b8
To: +4933caller <sip:[email protected]:5060;user=phone>;tag=132354529
Call-ID: e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de
CSeq: 102 BYE
Server: UI OpenSER
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
SIP Response message for INCOMING dialog BYE arrived
    -- Incoming call: Got SIP response 400 "Fehlerhafte SIP-Nachricht" back from 212.227.15.231

Rest des Logs von CLI nachdem ich den Anrufer aufgelegt habe:
Code:
<--- SIP read from 212.227.15.231:5060 --->
BYE sip:[email protected]:5060 SIP/2.0
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.232;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:195.71.47.146;lr=on;ftag=132354529>
Via: SIP/2.0/UDP 212.227.15.231:5060;branch=z9hG4bK55a9.bbdc0d2ce51099cde091827fa54131dd.0
Via: SIP/2.0/UDP 212.227.15.232;branch=z9hG4bK55a9.bbdc0d2ce51099cde091827fa54131dd.0
Via: SIP/2.0/UDP 212.227.15.231;branch=z9hG4bK55a9.d5dca2e1.0
Via: SIP/2.0/UDP 195.71.47.146;branch=z9hG4bK55a9.d5dca2e1.0
Via: SIP/2.0/UDP 1und1-8.sip.mgc.voip.telefonica.de:5060;received=193.189.245.140;branch=z9hG4bKterm-9d4279-+4933xxxxxxxx-+4933caller-9890
From: +4933caller <sip:[email protected]:5060;user=phone>;tag=132354529
To: +4933xxxxxxxx <sip:[email protected]:5060;user=phone>;tag=as74c859b8
Call-ID: e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de
CSeq: 2 BYE
Max-Forwards: 66
Supported: timer
Content-Length: 0
P-hint: rr-enforced


<------------->
--- (18 headers 0 lines) ---
Sending to 212.227.15.231 : 5060 (NAT)
Scheduling destruction of SIP dialog 'e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de' in 32000 ms (Method: BYE)

<--- Transmitting (NAT) to 212.227.15.231:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 212.227.15.231:5060;branch=z9hG4bK55a9.bbdc0d2ce51099cde091827fa54131dd.0;received=212.227.15.231
Via: SIP/2.0/UDP 212.227.15.232;branch=z9hG4bK55a9.bbdc0d2ce51099cde091827fa54131dd.0
Via: SIP/2.0/UDP 212.227.15.231;branch=z9hG4bK55a9.d5dca2e1.0
Via: SIP/2.0/UDP 195.71.47.146;branch=z9hG4bK55a9.d5dca2e1.0
Via: SIP/2.0/UDP 1und1-8.sip.mgc.voip.telefonica.de:5060;received=193.189.245.140;branch=z9hG4bKterm-9d4279-+4933xxxxxxxx-+4933caller-9890
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.232;lr=on;ftag=132354529>
Record-Route: <sip:212.227.15.231;lr=on;ftag=132354529>
Record-Route: <sip:195.71.47.146;lr=on;ftag=132354529>
From: +4933caller <sip:[email protected]:5060;user=phone>;tag=132354529
To: +4933xxxxxxxx <sip:[email protected]:5060;user=phone>;tag=as74c859b8
Call-ID: e4c51b6-5c46ece4-465658dd-465a@subscriber5.interconnect.mgc.voip.telefonica.de
CSeq: 2 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:[email protected]>
Content-Length: 0

Ich hoffe das mir jemand erklären kann wo das Problem liegt.

Vielen Dank
Fuso
 
ändere mal
Code:
...
externip=xxx.dyndns.org
...
in
Code:
...
externhost=xxx.dyndns.org
externrefresh=10
...
denke mal, "externip" heisst so, weil dort eine ip adresse rein soll...bei solchen fehlern ist meistens nat/externe ip schuld...

grüße,
laureen
 
Hallo Laureen,

vielen Dank für deine Antwort. Du hast recht. Es lag am Natting. Habe mehr Ports mit DNAT weiter geleitet als gut war. Hab jetzt nur noch die RTP Ports drin und schon funktioniert es reibungslos.

Gruß
Fuso
 
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.