Auth problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eugene Prokopiev wrote:
> Hi,
> 
> I need to use PJSUA with CallWeaver (Asterisk fork). I have this 
> configuration:
> 
> --id sip:testuser at 192.168.46.22
> --registrar sip:192.168.46.22
> --realm *
> --username testuser
> --password testpwd

Wildcard ("*") realm is only available with latest pjsip from SVN 
trunk. From the REGISTER request below, it seems that you're using 
pjsip v0.5.10.4. With this older pjsip, you'll need to specify the 
exact realm as received in the 401 challenge, in this case:
  --realm=callweaver.org

Btw next time it would be much better if you attach pjsua log file 
instead, which you can produce with --log-file option.

cheers,
  -benny


> So, I run PJSUA:
> 
> ./pjsua-i686-pc-linux-gnu --help
> 
> On running I see this messages on CallWeaver console:
> 
> <-- SIP read from 192.168.46.24:5060:
> REGISTER sip:192.168.46.22 SIP/2.0
> Via: SIP/2.0/UDP 
> 192.168.46.24:5060;rport;branch=z9hG4bKPj1f56000367458b6bc623
> Max-Forwards: 70
> From: <sip:testuser at 192.168.46.22>;tag=1f56000267458b6bc623
> To: <sip:testuser at 192.168.46.22>
> Call-ID: 1f56000167458b6bc623
> CSeq: 26972 REGISTER
> User-Agent: PJSUA v0.5.10.4/i686-pc-linux-gnu
> Contact: <sip:testuser at 192.168.46.24:5060;transport=UDP>
> Expires: 55
> Content-Length:  0
> 
> 
> --- (11 headers 0 lines) ---
> Using latest REGISTER request as basis request
> Sending to 192.168.46.24 : 5060 (NAT)
> Transmitting (NAT) to 192.168.46.24:5060:
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 
> 192.168.46.24:5060;branch=z9hG4bKPj1f56000367458b6bc623;received=192.168.46.24;rport=5060
> From: <sip:testuser at 192.168.46.22>;tag=1f56000267458b6bc623
> To: <sip:testuser at 192.168.46.22>
> Call-ID: 1f56000167458b6bc623
> CSeq: 26972 REGISTER
> User-Agent: CallWeaver
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Max-Forwards: 70
> Contact: <sip:testuser at 192.168.46.22>
> Content-Length: 0
> 
> 
> ---
> Transmitting (NAT) to 192.168.46.24:5060:
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 
> 192.168.46.24:5060;branch=z9hG4bKPj1f56000367458b6bc623;received=192.168.46.24;rport=5060
> From: <sip:testuser at 192.168.46.22>;tag=1f56000267458b6bc623
> To: <sip:testuser at 192.168.46.22>;tag=as7f7339cc
> Call-ID: 1f56000167458b6bc623
> CSeq: 26972 REGISTER
> User-Agent: CallWeaver
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Max-Forwards: 70
> WWW-Authenticate: Digest algorithm=MD5, realm="callweaver.org", 
> nonce="444dc6af"
> Content-Length: 0
> 
> So, PJSUA is unauthorized
> 
> Any other SIP User Agent (Ekiga, Twinkle and others) successfuly 
> registers on CallWeaver:
> 
> <-- SIP read from 192.168.46.23:5068:
> REGISTER sip:192.168.46.22 SIP/2.0
> CSeq: 13 REGISTER
> Via: SIP/2.0/UDP 
> 192.168.46.23:5068;branch=z9hG4bK3e20f0be-2161-dc11-87af-000479666ae8;rport
> User-Agent: Ekiga/2.0.9
> From: <sip:testuser at 192.168.46.22>;tag=6e18f0be-2161-dc11-87af-000479666ae8
> Call-ID: 
> bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru
> To: <sip:testuser at 192.168.46.22>
> Contact: <sip:testuser at 192.168.46.23:5068;transport=udp>
> Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,NOTIFY,REFER,MESSAGE
> Expires: 3600
> Content-Length: 0
> Max-Forwards: 70
> 
> 
> --- (12 headers 0 lines) ---
> Using latest REGISTER request as basis request
> Sending to 192.168.46.23 : 5068 (NAT)
> Transmitting (NAT) to 192.168.46.23:5068:
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 
> 192.168.46.23:5068;branch=z9hG4bK3e20f0be-2161-dc11-87af-000479666ae8;received=192.168.46.23;rport=5068
> From: <sip:testuser at 192.168.46.22>;tag=6e18f0be-2161-dc11-87af-000479666ae8
> To: <sip:testuser at 192.168.46.22>
> Call-ID: 
> bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru
> CSeq: 13 REGISTER
> User-Agent: CallWeaver
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Max-Forwards: 70
> Contact: <sip:testuser at 192.168.46.22>
> Content-Length: 0
> 
> 
> ---
> Transmitting (NAT) to 192.168.46.23:5068:
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 
> 192.168.46.23:5068;branch=z9hG4bK3e20f0be-2161-dc11-87af-000479666ae8;received=192.168.46.23;rport=5068
> From: <sip:testuser at 192.168.46.22>;tag=6e18f0be-2161-dc11-87af-000479666ae8
> To: <sip:testuser at 192.168.46.22>;tag=as690f500f
> Call-ID: 
> bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru
> CSeq: 13 REGISTER
> User-Agent: CallWeaver
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Max-Forwards: 70
> WWW-Authenticate: Digest algorithm=MD5, realm="callweaver.org", 
> nonce="7a4ca05e"
> Content-Length: 0
> 
> 
> ---
> Scheduling destruction of call 
> 'bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru' 
> in 15000 ms
> callweaver*CLI>
> <-- SIP read from 192.168.46.23:5068:
> REGISTER sip:192.168.46.22 SIP/2.0
> CSeq: 14 REGISTER
> Via: SIP/2.0/UDP 
> 192.168.46.23:5068;branch=z9hG4bKaa12f1be-2161-dc11-87af-000479666ae8;rport
> User-Agent: Ekiga/2.0.9
> Authorization: Digest username="testuser", realm="callweaver.org", 
> nonce="7a4ca05e", uri="sip:192.168.46.22", algorithm=md5, 
> response="587e9fc5b5311ebe9dfb5e233c56cae8"
> From: <sip:testuser at 192.168.46.22>;tag=6e18f0be-2161-dc11-87af-000479666ae8
> Call-ID: 
> bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru
> To: <sip:testuser at 192.168.46.22>
> Contact: <sip:testuser at 192.168.46.23:5068;transport=udp>
> Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,NOTIFY,REFER,MESSAGE
> Expires: 3600
> Content-Length: 0
> Max-Forwards: 70
> 
> 
> --- (13 headers 0 lines) ---
> Using latest REGISTER request as basis request
> Sending to 192.168.46.23 : 5068 (NAT)
> Transmitting (NAT) to 192.168.46.23:5068:
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 
> 192.168.46.23:5068;branch=z9hG4bKaa12f1be-2161-dc11-87af-000479666ae8;received=192.168.46.23;rport=5068
> From: <sip:testuser at 192.168.46.22>;tag=6e18f0be-2161-dc11-87af-000479666ae8
> To: <sip:testuser at 192.168.46.22>
> Call-ID: 
> bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru
> CSeq: 14 REGISTER
> User-Agent: CallWeaver
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Max-Forwards: 70
> Contact: <sip:testuser at 192.168.46.22>
> Content-Length: 0
> 
> 
> ---
> Transmitting (NAT) to 192.168.46.23:5068:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 
> 192.168.46.23:5068;branch=z9hG4bKaa12f1be-2161-dc11-87af-000479666ae8;received=192.168.46.23;rport=5068
> From: <sip:testuser at 192.168.46.22>;tag=6e18f0be-2161-dc11-87af-000479666ae8
> To: <sip:testuser at 192.168.46.22>;tag=as690f500f
> Call-ID: 
> bae5efbe-2161-dc11-87af-000479666ae8 at enp-desktop.ats-network.stc.donpac.ru
> CSeq: 14 REGISTER
> User-Agent: CallWeaver
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Max-Forwards: 70
> Expires: 3600
> Contact: <sip:testuser at 192.168.46.23:5068;transport=udp>;expires=3600
> Date: Fri, 14 Sep 2007 11:18:26 GMT
> Content-Length: 0
> 
> Is it possible to do the same with PJSUA?





[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux