Re: [JsSIP] Error in registration?

132 views
Skip to first unread message

José Luis Millán

unread,
Jan 15, 2020, 5:22:34 AM1/15/20
to js...@googlegroups.com
Hi,

Sorry, you are the one who needs to tell us about the problem/s you're experiencing.

El mar., 14 ene. 2020 a las 23:36, Ali Elhelali (<ali.el...@equiinet.com>) escribió:
Can anyone spot what's going on? I can barely read SIP traffic, so I would appreciate any help I could get

I used this https://jsfiddle.net/msqenm70/1/ and connected it to our custom version of asterisk 11 and updated cdn to a version 2 or 3 of jssip with similar results. Here is my attempt to run the program with a JsSIP:UA  start(), register() and call() 

  == WebSocket connection from 'xx.xx.xx.xx:XXXX' for protocol 'sip' accepted using version '13'

<--- SIP read from WS:xx.xx.xx.xx:XXXX --->
REGISTER sip:xx.xx.xx.xx SIP/2.0
Via: SIP/2.0/WS fa5eupb46pp5.invalid;branch=z9hG4bK7685677
Max-Forwards: 69
To: <sip:10...@xx.xx.xx.xx:XXXX>
From: "1022" <sip:10...@xx.xx.xx.xx>;tag=9mc44i8n7k
Call-ID: 4jbff2prjdej4sqb9fpb72
CSeq: 2 REGISTER
Contact: <sip:r4gd...@fa5eupb46pp5.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:78d8
9e3e-a4dd-4698-82dd-f8299c71a646>";expires=600
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 2.0.2
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---


<--- Transmitting (NAT) to xx.xx.xx.xx:XXXX --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WS fa5eupb46pp5.invalid;branch=z9hG4bK7685677;received=xx.xx.xx.xx;rport=XXX
From: "1022" <sip:10...@xx.xx.xx.xx>;tag=9mc44i8n7k
To: <sip:10...@xx.xx.xx.xx>;tag=as719bcf07
Call-ID: 4jbff2prjdej4sqb9fpb72
CSeq: 2 REGISTER
Server: Asterisk PBX 11.13.1~dfsg-2~bpo70+2~eq5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5302992b"
Content-Length: 0


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



<------------>
Scheduling destruction of SIP dialog '4jbff2prjdej4sqb9fpb72' in 32000 ms (Method: REGISTER)

<--- SIP read from WS:xx.xx.xx.xx:XXX --->
REGISTER sip:xx.xx.xx.xx SIP/2.0
Via: SIP/2.0/WS fa5eupb46pp5.invalid;branch=z9hG4bK3620291
Max-Forwards: 69
To: <sip:1022@:xx.xx.xx.xx:XXX>
From: "1022" <sip:1022@:xx.xx.xx.xx>;tag=9mc44i8n7k
Call-ID: 4jbff2prjdej4sqb9fpb72
CSeq: 3 REGISTER
Authorization: Digest algorithm=MD5, username="1022", realm="asterisk", nonce="5302992b", uri="sip:xx.xx.xx.xx", response="72036b443b283b0ea425dfa6eb09c4ec"
Contact: <sip:r4gd...@fa5eupb46pp5.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:78d8
9e3e-a4dd-4698-82dd-f8299c71a646>";expires=600
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 2.0.2
Content-Length: 0


<------------->
--- (14 headers 0 lines) ---
  == WebSocket connection from ':xx.xx.xx.xx:XXX' closed
    -- Registered SIP '1022' at :xx.xx.xx.xx:XXX

<--- Transmitting (NAT) to :xx.xx.xx.xx:XXX --->
SIP/2.0 200 OK
Via: SIP/2.0/WS fa5eupb46pp5.invalid;branch=z9hG4bK3620291;received=:xx.xx.xx.xx:XXX;rport=XXXX
From: "1022" <sip:1022@:xx.xx.xx.xx>;tag=9mc44i8n7k
To: <sip:1022@:xx.xx.xx.xx:XXX>;tag=as719bcf07
Call-ID: 4jbff2prjdej4sqb9fpb72
CSeq: 3 REGISTER
Server: Asterisk PBX 11.13.1~dfsg-2~bpo70+2~eq5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 600
Contact: <sip:r4gd...@fa5eupb46pp5.invalid;transport=ws>;expires=600
Date: Tue, 14 Jan 2020 22:27:35 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '4jbff2prjdej4sqb9fpb72' in 32000 ms (Method: REGISTER)


--
You received this message because you are subscribed to the Google Groups "JsSIP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jssip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jssip/86f236f6-4e10-4203-8b29-f391c914dd10%40googlegroups.com.


--
José Luis Millán

WebRTC

unread,
Jul 5, 2022, 3:17:11 PM7/5/22
to JsSIP
Hello, Excuse me, by any chance do you have the example code so that you can provide me with the example? I need to know how to respond to unauthorized 401
Reply all
Reply to author
Forward
0 new messages