Question regarding using pjsua

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

 



 Jim,

When you get back the response to your original REGISTER request the
remote end is providing a nonce to complete the authentication with MD5.
However, pjsip is not matching the credentials you supplied to the realm
they are sending back: toronto.voip.ms. Though you specified the realm
as "*" pjsip is not matching that to toronto.voip.ms. Try explicitly
setting your realm to toronto.voip.ms. I've not messed with realm
wildcards so I have no idea if that should work or why yours doesn't,
but it is clear from the log messages that it cannot proceed with
authentication because it isn't matching the realm.

On 7/21/10 6:18 AM, Jim Duffy wrote:
> I am further along in my attempt to make a call with pjsua-1.6 through
> our SIP provider.
>
> I edited SIPCONFIG to read:
>
> # pjsua SIP client config file
> # ------------------------------------------
> --id sip:111111_222222 at 111.222.333.000
> --registrar sip:111.222.333.000
> --username 111111_222222
> --password mypassword
> --realm "*"
> --proxy sip:111.222.333.000
> --no-tcp
>
> I then executed:
>
> pjsua-i686-pc-mingw32.exe --config-file SIPCONFIG
>
> Here is the resulting console log:
> _______________________________________________________________________________
>
>  14:58:28.328   pjsua_core.c  pjsua version 1.6 for i686-pc-mingw32
> initialized
>  14:58:28.328 sip_endpoint.c  Module "mod-default-handler" registered
>  14:58:28.343   pjsua_core.c  SIP UDP socket reachable at
> 192.168.1.005:5060
>  14:58:28.343    udp00b86440  SIP UDP transport started, published
> address is 192.168.1.005:5060
>  14:58:28.343    pjsua_acc.c  Account <sip:192.168.1.005:5060> added
> with id 0
>  14:58:28.343    pjsua_acc.c  Account
> sip:111111_222222 at 111.222.333.000 added with id 1
>  14:58:28.343   pjsua_core.c  TX 494 bytes Request msg
> REGISTER/cseq=58283 (tdta00b88a88) to UDP 111.222.333.000:5060:
> REGISTER sip:111.222.333.000 SIP/2.0
> Via: SIP/2.0/UDP
> 192.168.1.005:5060;rport;branch=z9hG4bKPja28d7ab910994a0fa807ae4870e45dbd
> Route: <sip:111.222.333.000;lr>
> Max-Forwards: 70
> From:
> <sip:111111_222222 at 111.222.333.000>;tag=fb67fa2cfc1e4b81aae9e49506ebecc4
> To: <sip:111111_222222 at 111.222.333.000>
> Call-ID: dd11f5f22e6c48af86f709fe8665d12a
> CSeq: 58283 REGISTER
> User-Agent: PJSUA v1.6/i686-pc-mingw32
> Contact: <sip:111111_222222 at 192.168.1.005:5060>
> Expires: 300
> Content-Length:  0
>
>
> --end msg--
>  14:58:28.343    pjsua_acc.c  Registration sent
>  14:58:28.359  pjsua_media.c  RTP socket reachable at 192.168.1.005:4000
>  14:58:28.359  pjsua_media.c  RTCP socket reachable at 192.168.1.005:4001
>  14:58:28.359   pjsua_core.c  RX 469 bytes Response msg
> 100/REGISTER/cseq=58283 (rdata00b868b4) from UDP 111.222.333.000:5060:
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP
> 192.168.1.005:5060;branch=z9hG4bKPja28d7ab910994a0fa807ae4870e45dbd;received=76.70.9.182;rport=5060
> From:
> <sip:111111_222222 at 111.222.333.000>;tag=fb67fa2cfc1e4b81aae9e49506ebecc4
> To: <sip:111111_222222 at 111.222.333.000>
> Call-ID: dd11f5f22e6c48af86f709fe8665d12a
> CSeq: 58283 REGISTER
> User-Agent: VoIPMS/SERAST
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
> Supported: replaces
> Content-Length: 0
>
>
> --end msg--
>  14:58:28.375   pjsua_core.c  RX 573 bytes Response msg
> 401/REGISTER/cseq=58283 (rdata00b868b4) from UDP 111.222.333.000:5060:
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP
> 192.168.1.005:5060;branch=z9hG4bKPja28d7ab910994a0fa807ae4870e45dbd;received=76.70.9.182;rport=5060
> From:
> <sip:111111_222222 at 111.222.333.000>;tag=fb67fa2cfc1e4b81aae9e49506ebecc4
> To: <sip:111111_222222 at 111.222.333.000>;tag=as26b03c70
> Call-ID: dd11f5f22e6c48af86f709fe8665d12a
> CSeq: 58283 REGISTER
> User-Agent: VoIPMS/SERAST
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
> Supported: replaces
> WWW-Authenticate: Digest algorithm=MD5, realm="toronto.voip.ms",
> nonce="3a05c1de"
> Content-Length: 0
>
>
> --end msg--
>  14:58:28.375 sip_auth_clien  Unable to set auth for tdta00b88a88: can
> not find credential for toronto.voip.ms/Digest
>  14:58:28.390  pjsua_media.c  RTP socket reachable at 192.168.1.005:4002
>  14:58:28.390  pjsua_media.c  RTCP socket reachable at 192.168.1.005:4003
>  14:58:28.406  pjsua_media.c  RTP socket reachable at 192.168.1.005:4004
>  14:58:28.406  pjsua_media.c  RTCP socket reachable at 192.168.1.005:4005
>  14:58:28.421  pjsua_media.c  RTP socket reachable at 192.168.1.005:4006
>  14:58:28.421  pjsua_media.c  RTCP socket reachable at 192.168.1.005:4007
>  14:58:28.421    pjsua_acc.c  SIP registration error: No suitable
> credential (PJSIP_ENOCREDENTIAL) [status=171101]
>  14:58:28.421 sip_endpoint.c  Module "mod-unsolicited-mwi" registered
>
> The username and password are definitely correct.
>
> Any thoughts on why registration fails?
>
> Thank you.
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


-- 
Jens B. Jorgensen
jbj1 at ultraemail.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100721/cb259e45/attachment.html>


[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