.titleBar { margin-bottom: 5px!important; }

Asterisk -> Asterisk | 1Account OK | 2Accounts FEHLER

Dieses Thema im Forum "Asterisk Allgemein" wurde erstellt von thisismyname, 21 Okt. 2008.

  1. thisismyname

    thisismyname Neuer User

    Registriert seit:
    24 Sep. 2008
    Beiträge:
    78
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    Beruf:
    Student
    Guten morgen liebe vieltelefonierer,

    mal wieder ein Problem der ganz besonderen Sorte. Bei mir steht links ein Asterisk und rechts ein Asterisk. Links soll sich auf Rechts mit sip accounts anmelden. Mit einem Account geht das wunderbar. Das ganze schaut dann so aus:

    Code:
    EXTENSION.CONF
    [general]
    port=5060
    bindaddr=0.0.0.0
    srvlookup = yes
    defaultexpiry=600
    
    ;register => 3000:1234@10.0.0.11/3000
    register => 3001:5678@10.0.0.11/3001
    
    ;[3000]
    ;context=tel3000
    ;type=peer
    ;secret=1234
    ;busy-level=1000
    ;username=3000
    ;fromuser=3000
    ;secret=1234
    ;host=10.0.0.11
    ;Asterisk sip auth = 3000
    
    [3001]
    context=tel3001
    type=friend
    secret=1234
    busy-level=1000
    username=3001
    fromuser=3001
    secret=5678
    host=10.0.0.11
    Asterisk sip auth = 3001
    
    Und hier der SIP TRACE:

    Code:
    *CLI> REGISTER 12 headers, 0 lines
    Reliably Transmitting (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK534105a1;rport
    From: <sip:3001@10.0.0.11>;tag=as74bf8857
    To: <sip:3001@10.0.0.11>
    Call-ID: 57971aeb78ffdbee19729d207b11aca7@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    
    <--- SIP read from 10.0.0.11:5060 --->
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK534105a1;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as74bf8857
    To: <sip:3001@10.0.0.11>
    Call-ID: 57971aeb78ffdbee19729d207b11aca7@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Contact: <sip:3001@10.0.0.11>
    Content-Length: 0
    
    
    <------------->
    --- (10 headers 0 lines) ---
    
    <--- SIP read from 10.0.0.11:5060 --->
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK534105a1;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as74bf8857
    To: <sip:3001@10.0.0.11>;tag=as703af09d
    Call-ID: 57971aeb78ffdbee19729d207b11aca7@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2489e1b5"
    Content-Length: 0
    
    
    <------------->
    --- (10 headers 0 lines) ---
    Responding to challenge, registration to domain/host name 10.0.0.11
    REGISTER 13 headers, 0 lines
    Reliably Transmitting (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK759841a2;rport
    From: <sip:3001@10.0.0.11>;tag=as231fda3e
    To: <sip:3001@10.0.0.11>
    Call-ID: 57971aeb78ffdbee19729d207b11aca7@127.0.1.1
    CSeq: 103 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Authorization: Digest username="3001", realm="asterisk", algorithm=MD5, uri="sip:10.0.0.11", nonce="2489e1b5", response="0b6558e9e17d9bb17669482f17514d79", opaque=""
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    
    <--- SIP read from 10.0.0.11:5060 --->
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK759841a2;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as231fda3e
    To: <sip:3001@10.0.0.11>
    Call-ID: 57971aeb78ffdbee19729d207b11aca7@127.0.1.1
    CSeq: 103 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Contact: <sip:3001@10.0.0.11>
    Content-Length: 0
    
    
    <------------->
    --- (10 headers 0 lines) ---
    
    <--- SIP read from 10.0.0.11:5060 --->
    SIP/2.0 200 OK
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK759841a2;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as231fda3e
    To: <sip:3001@10.0.0.11>;tag=as703af09d
    Call-ID: 57971aeb78ffdbee19729d207b11aca7@127.0.1.1
    CSeq: 103 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Expires: 600
    Contact: <sip:3001@10.0.0.10>;expires=600
    Date: Tue, 21 Oct 2008 07:20:11 GMT
    Content-Length: 0
    
    
    <------------->
    --- (12 headers 0 lines) ---
    Scheduling destruction of SIP dialog '57971aeb78ffdbee19729d207b11aca7@127.0.1.1' in 32000 ms (Method: REGISTER)
    
    Will ich das ganze nun mit 2 Accounts machen... funktioniert gar nichts mehr. Die sip.conf:
    Code:
    [general]
    port=5060
    bindaddr=0.0.0.0
    srvlookup = yes
    defaultexpiry=600
    
    register => 3000:1234@10.0.0.11/3000
    register => 3001:5678@10.0.0.11/3001
    
    [3000]
    context=tel3000
    type=peer
    secret=1234
    busy-level=1000
    username=3000
    fromuser=3000
    secret=1234
    host=10.0.0.11
    Asterisk sip auth = 3000
    
    [3001]
    context=tel3001
    type=friend
    secret=1234
    busy-level=1000
    username=3001
    fromuser=3001
    secret=5678
    host=10.0.0.11
    Asterisk sip auth = 3001
    
    Und der SIP TRACE:

    Code:
    *CLI> REGISTER 12 headers, 0 lines
    Reliably Transmitting (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK4f933bdb;rport
    From: <sip:3001@10.0.0.11>;tag=as65d78cc8
    To: <sip:3001@10.0.0.11>
    Call-ID: 18ef901769183f4771857f99318e9288@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    [Oct 21 09:33:15] NOTICE[13669]: chan_sip.c:7400 sip_reregister:    -- Re-registration for  3000@10.0.0.11
    REGISTER 12 headers, 0 lines
    Reliably Transmitting (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK0e1d230f;rport
    From: <sip:3000@10.0.0.11>;tag=as0f3dc45f
    To: <sip:3000@10.0.0.11>
    Call-ID: 6dbb16853fa06a1d39f110c855bdcd92@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3000@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    Retransmitting #1 (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK4f933bdb;rport
    From: <sip:3001@10.0.0.11>;tag=as65d78cc8
    To: <sip:3001@10.0.0.11>
    Call-ID: 18ef901769183f4771857f99318e9288@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    [Oct 21 09:33:55] NOTICE[13669]: chan_sip.c:7430 sip_reg_timeout:    -- Registration for '3001@10.0.0.11' timed out    , trying again (Attempt #1)
    REGISTER 12 headers, 0 lines
    Reliably Transmitting (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK3f700a7b;rport
    From: <sip:3001@10.0.0.11>;tag=as13402696
    To: <sip:3001@10.0.0.11>
    Call-ID: 18ef901769183f4771857f99318e9288@127.0.1.1
    CSeq: 103 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    Retransmitting #1 (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK0e1d230f;rport
    From: <sip:3000@10.0.0.11>;tag=as0f3dc45f
    To: <sip:3000@10.0.0.11>
    Call-ID: 6dbb16853fa06a1d39f110c855bdcd92@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3000@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    
    ---
    [Oct 21 09:34:35] NOTICE[13669]: chan_sip.c:7430 sip_reg_timeout:    -- Registration for '3000@10.0.0.11' timed out, trying again (Attempt #1)
    REGISTER 12 headers, 0 lines
    Reliably Transmitting (no NAT) to 10.0.0.11:5060:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6e32d258;rport
    From: <sip:3000@10.0.0.11>;tag=as017834fa
    To: <sip:3000@10.0.0.11>
    Call-ID: 6dbb16853fa06a1d39f110c855bdcd92@127.0.1.1
    CSeq: 103 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3000@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    Das seltsame ist, verfolge ich das ganze mit wireshark bekomme ich sehrwohl eine Antwort... die schaut dann so aus:

    Code:
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6022e64a;rport
    From: <sip:3001@10.0.0.11>;tag=as65357d71
    To: <sip:3001@10.0.0.11>
    Call-ID: 419503517135f19b4a15908d5078e610@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6022e64a;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as65357d71
    To: <sip:3001@10.0.0.11>
    Call-ID: 419503517135f19b4a15908d5078e610@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Contact: <sip:3001@10.0.0.11>
    Content-Length: 0
    
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6022e64a;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as65357d71
    To: <sip:3001@10.0.0.11>;tag=as7ab4c199
    Call-ID: 419503517135f19b4a15908d5078e610@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5f6657ab"
    Content-Length: 0
    
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK01bbd603;rport
    From: <sip:3000@10.0.0.11>;tag=as0844cc26
    To: <sip:3000@10.0.0.11>
    Call-ID: 1a2cab3815db6d0e36343af0656597b0@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3000@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    REGISTER sip:10.0.0.11 SIP/2.0
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6022e64a;rport
    From: <sip:3001@10.0.0.11>;tag=as65357d71
    To: <sip:3001@10.0.0.11>
    Call-ID: 419503517135f19b4a15908d5078e610@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Max-Forwards: 70
    Expires: 600
    Contact: <sip:3001@10.0.0.10>
    Event: registration
    Content-Length: 0
    
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK01bbd603;rport;received=10.0.0.10
    From: <sip:3000@10.0.0.11>;tag=as0844cc26
    To: <sip:3000@10.0.0.11>
    Call-ID: 1a2cab3815db6d0e36343af0656597b0@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Contact: <sip:3000@10.0.0.11>
    Content-Length: 0
    
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK01bbd603;rport;received=10.0.0.10
    From: <sip:3000@10.0.0.11>;tag=as0844cc26
    To: <sip:3000@10.0.0.11>;tag=as1ddf11ef
    Call-ID: 1a2cab3815db6d0e36343af0656597b0@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6ccca2c9"
    Content-Length: 0
    
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6022e64a;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as65357d71
    To: <sip:3001@10.0.0.11>
    Call-ID: 419503517135f19b4a15908d5078e610@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Contact: <sip:3001@10.0.0.11>
    Content-Length: 0
    
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 10.0.0.10:5060;branch=z9hG4bK6022e64a;rport;received=10.0.0.10
    From: <sip:3001@10.0.0.11>;tag=as65357d71
    To: <sip:3001@10.0.0.11>;tag=as53a9cd02
    Call-ID: 419503517135f19b4a15908d5078e610@127.0.1.1
    CSeq: 102 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5e5e17b4"
    Content-Length: 0
    Ich hab schon sehr viel mit type=friend/peer herrumgespielt und auch schon einige andere Sachen versucht... Ich denke im Prinzip sollte mal nur eine Option aendern muessen und dann muesste es gehen... nur welche? ;)

    Ich hoff irgnedwer von euch kann mir helfen... would be nice, greetz

    myname
     
  2. doxon

    doxon Mitglied

    Registriert seit:
    11 Juni 2006
    Beiträge:
    781
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    Beruf:
    IT-Systemelektroniker
    Ort:
    Aurich
    Mal ne generelle Frage,

    wozu brauchst du die mehreren Accounts denn?
    Evtl. Ist eine Lösung mit IAX ja schöner.
     
  3. Burmann

    Burmann Mitglied

    Registriert seit:
    16 Feb. 2005
    Beiträge:
    372
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    Mit
    secret=1234
    secret=5678

    bei einem SIP-Account funktioniert wohl nix.

    Aber abgesehen davon wird's auch nicht gehen, da Asterisk (ankommend) die Accounts nicht auseinanderhalten kann. Dies bedeutet wenn bei allen das PW gleich ist, wird's gehen. Welchen Account er dann ankommend benutzt wird muß man ausprobieren. Abgehender Ruf wird der richtige (den man im Dial angegeben hat) genommen.