SIP 401 — Unauthorised

VitalPBX Community Support General Discussion SIP 401 — Unauthorised

  • Post
    rudolfl
    Participant
    Hi all,

    Trying to make an outgoing call from ext. 102 to (0)0414635468 (first 0 is a prefix to dial out)

    Call gets through, but first I can see 401 Unauthorised in SIP log (at the bottom of this post). Is it normal to get 401 before second attempt goes through? Note — this is not me trying to dial again, this is an automatic process. Happens on every call

     

    <— SIP read from UDP:192.168.1.12:5060 —>
    INVITE sip:00414635468@192.168.1.23;user=phone SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.12;branch=z9hG4bK85fd29748C00D427
    From: “CUPIDS” <sip:102@192.168.1.23>;tag=B1F41BA-80F3124B
    To: <sip:00414635468@192.168.1.23;user=phone>
    CSeq: 1 INVITE
    Call-ID: a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    Contact: <sip:102@192.168.1.12>
    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
    User-Agent: PolycomSoundPointIP-SPIP_300-UA/2.1.3.0028
    Supported: 100rel,replaces
    Allow-Events: talk,hold,conference
    Max-Forwards: 70
    Content-Type: application/sdp
    Content-Length: 247

    v=0
    o=- 978309032 978309032 IN IP4 192.168.1.12
    s=Polycom IP Phone
    c=IN IP4 192.168.1.12
    t=0 0
    m=audio 2234 RTP/AVP 0 8 18 101
    a=sendrecv
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=rtpmap:101 telephone-event/8000
    <————->
    — (14 headers 11 lines) —
    Sending to 192.168.1.12:5060 (no NAT)
    Sending to 192.168.1.12:5060 (no NAT)
    Using INVITE request as basis request – a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    Found peer ‘102’ for ‘102’ from 192.168.1.12:5060

    <— Reliably Transmitting (no NAT) to 192.168.1.12:5060 —>
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 192.168.1.12;branch=z9hG4bK85fd29748C00D427;received=192.168.1.12
    From: “CUPIDS” <sip:102@192.168.1.23>;tag=B1F41BA-80F3124B
    To: <sip:00414635468@192.168.1.23;user=phone>;tag=as0def3690
    Call-ID: a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    CSeq: 1 INVITE
    Server: VitalPBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    Supported: replaces, timer
    WWW-Authenticate: Digest algorithm=MD5, realm=”asterisk”, nonce=”0bc7d308″
    Content-Length: 0

    <————>
    Scheduling destruction of SIP dialog ‘a16f2086-dc05dc8-c9b41cc1@192.168.1.12’ in 6400 ms (Method: INVITE)

    <— SIP read from UDP:192.168.1.12:5060 —>
    ACK sip:00414635468@192.168.1.23 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.12;branch=z9hG4bK85fd29748C00D427
    From: “CUPIDS” <sip:102@192.168.1.23>;tag=B1F41BA-80F3124B
    To: <sip:00414635468@192.168.1.23;user=phone>;tag=as0def3690
    CSeq: 1 ACK
    Call-ID: a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    Contact: <sip:102@192.168.1.12>
    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
    User-Agent: PolycomSoundPointIP-SPIP_300-UA/2.1.3.0028
    Max-Forwards: 70
    Content-Length: 0

    <————->
    — (11 headers 0 lines) —

    <— SIP read from UDP:192.168.1.12:5060 —>
    INVITE sip:00414635468@192.168.1.23;user=phone SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.12;branch=z9hG4bK9d106745729158DC
    From: “CUPIDS” <sip:102@192.168.1.23>;tag=B1F41BA-80F3124B
    To: <sip:00414635468@192.168.1.23;user=phone>
    CSeq: 2 INVITE
    Call-ID: a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    Contact: <sip:102@192.168.1.12>
    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
    User-Agent: PolycomSoundPointIP-SPIP_300-UA/2.1.3.0028
    Supported: 100rel,replaces
    Allow-Events: talk,hold,conference
    Authorization: Digest username=”102″, realm=”asterisk”, nonce=”0bc7d308″, uri=”sip:00414635468@192.168.1.23;user=phone”, response=”c207dc1fcffa07680718532caf8acab3″, algorithm=MD5
    Max-Forwards: 70
    Content-Type: application/sdp
    Content-Length: 247

    v=0
    o=- 978309032 978309032 IN IP4 192.168.1.12
    s=Polycom IP Phone
    c=IN IP4 192.168.1.12
    t=0 0
    m=audio 2234 RTP/AVP 0 8 18 101
    a=sendrecv
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=rtpmap:101 telephone-event/8000
    <————->
    — (15 headers 11 lines) —
    Sending to 192.168.1.12:5060 (no NAT)
    Using INVITE request as basis request – a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    Found peer ‘102’ for ‘102’ from 192.168.1.12:5060
    Found RTP audio format 0
    Found RTP audio format 8
    Found RTP audio format 18
    Found RTP audio format 101
    Found audio description format PCMU for ID 0
    Found audio description format PCMA for ID 8
    Found audio description format G729 for ID 18
    Found audio description format telephone-event for ID 101
    Capabilities: us – (ulaw|alaw|g729), peer – audio=(ulaw|alaw|g729)/video=(nothing)/text=(nothing), combined – (ulaw|alaw|g729)
    Non-codec capabilities (dtmf): us – 0x1 (telephone-event|), peer – 0x1 (telephone-event|), combined – 0x1 (telephone-event|)
    Peer audio RTP is at port 192.168.1.12:2234
    Looking for 00414635468 in cos-all (domain 192.168.1.23)
    sip_route_dump: route/path hop: <sip:102@192.168.1.12>

    <— Transmitting (no NAT) to 192.168.1.12:5060 —>
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 192.168.1.12;branch=z9hG4bK9d106745729158DC;received=192.168.1.12
    From: “CUPIDS” <sip:102@192.168.1.23>;tag=B1F41BA-80F3124B
    To: <sip:00414635468@192.168.1.23;user=phone>
    Call-ID: a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    CSeq: 2 INVITE
    Server: VitalPBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    Supported: replaces, timer
    Contact: <sip:00414635468@192.168.1.23:5060>
    Content-Length: 0

    <————>
    Audio is at 16102
    Adding codec ulaw to SDP
    Adding codec alaw to SDP
    Adding codec g729 to SDP
    Adding non-codec 0x1 (telephone-event) to SDP
    Reliably Transmitting (no NAT) to 223.252.19.169:5060:
    INVITE sip:0414635468@sip.australianphone.com.au SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.23:5060;branch=z9hG4bK5ebb93ce
    Max-Forwards: 70
    From: “Cupids” <sip:14490@sip.australianphone.com.au>;tag=as3023fdce
    To: <sip:0414635468@sip.australianphone.com.au>
    Contact: <sip:14490@192.168.1.23:5060>
    Call-ID: 367e660c1af676d70d9e4cd74f9419cb@sip.australianphone.com.au
    CSeq: 102 INVITE
    User-Agent: VitalPBX
    Date: Fri, 29 May 2020 03:56:46 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    Supported: replaces, timer
    Remote-Party-ID: “Cupids” <sip:0395795221@sip.australianphone.com.au>;party=calling;privacy=off;screen=no
    Content-Type: application/sdp
    Content-Length: 320

    v=0
    o=root 303900385 303900385 IN IP4 192.168.1.23
    s=Asterisk PBX 16.6.2
    c=IN IP4 192.168.1.23
    t=0 0
    m=audio 16102 RTP/AVP 0 8 18 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    a=maxptime:150
    a=sendrecv

    <— Transmitting (no NAT) to 192.168.1.12:5060 —>
    SIP/2.0 180 Ringing
    Via: SIP/2.0/UDP 192.168.1.12;branch=z9hG4bK9d106745729158DC;received=192.168.1.12
    From: “CUPIDS” <sip:102@192.168.1.23>;tag=B1F41BA-80F3124B
    To: <sip:00414635468@192.168.1.23;user=phone>;tag=as4aaad62d
    Call-ID: a16f2086-dc05dc8-c9b41cc1@192.168.1.12
    CSeq: 2 INVITE
    Server: VitalPBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    Supported: replaces, timer
    Contact: <sip:00414635468@192.168.1.23:5060>
    Content-Length: 0

    0
Viewing 1 replies (of 1 total)
  • Replies
    Up
    0
    Down
    Answering to your question:

    Yes, that’s normal behavior for calls. You can use sngrep command, to monitoring in realtime the calls traffic and all the steps related to them.

    0
Viewing 1 replies (of 1 total)

Tagged: , ,

  • You must be logged in to reply to this topic.