Hello all.

I think i have the same issue .. i'm using the latest sipxtapi from the 
main branch on 64 bit linux with my-self patched dns packet parsing (the 
one in trunk is not working on 64 bit platforms).
using placecall example (ofcourse modified - coz the one in trunk - does 
not use szProxy variable at all)

i'm trying to connect to sip server using digest authentication - and, 
yes i'm sure that all credentials and settings are ok (tested on 
hardware sip telephone)

scheme looks like this

1.placecall example searches the dns'es
2.got ip from dns system
3.placecall sends register message with cseq 101 and without 
WWW-authenticate field
4.server responds 401unauthorized WITH WWW-authenticate field with realm 
and nonce , with cseq 101
5.placecall resends register which looks the same as first
and point from 3-4 repeats few times.

after seeing it i thought, that maybe UDP subsystem cannot receive any 
data in PlaceCall application.
so runned it under strace .
and now the best - every recvfrom command called by placecall returns 
with failure

18363 recvfrom(13, 0xf6fff0, 10240, 16384, 0, 0) = -1 ECONNREFUSED 
(Connection refused)

and there's also a small notice in PlaceCall.log :
 60037 
"2009-05-14T17:55:51.422465Z":60041:SIP:DEBUG:noderblade:SipClient-29:5CEE9950:sipXtapi:"Shutting
 
down client: 195.200.214.112 due to failed socket (-1)? bytes: 0 isOk: NO"

can anybody help me ? :(

i simply don't know where else can i search ..
i've searched almost everywhere .. SipClient.h/cpp 
SipProtocolServerBase.h/cpp SipUdpServer.h/cpp and finally 
OsNatDatagramSocket.h/cpp
not found anything yet...

in placecall ofcourse i'm doind line registering to "true" and all 
things which are necessary to make proxy - digest authenticated connection


Regards,

Marcin


Manoj Joshi wrote:
> Ok...
>
> Actually the SIP Server is Nextone MSX. I am not sure they will make any
> changes at their side. Can you suggest some workaround?
>
> I wonder how x-lite is able to register.
>
> Regards,
>
> Manoj
>
> -----Original Message-----
> From: Daniel Petrie [mailto:[email protected]]
> Sent: Friday, May 15, 2009 8:24 PM
> To: Alexander Chemeris; Manoj Joshi
> Cc: [email protected]
> Subject: RE: [sipxtapi-dev] Register Unauthorized issue -- ven if
> correct Realm is specified
>
>
>
> Hi Manoj:
> The registry server that you are using in this case is broken.  It is
> sending the 401 response with no Cseq header (should be Cseq: 101).  As such
> it is an invalid SIP response that cannot be matched to the REGISTER
> request.  You will notice that the REGISTER request is resent several times
> as defined by RFC3261 for reliability (search for resend in log) it then
> attempts resending over TCP.  The 401 responses are ignored as they do not
> match the transaction for the REGISTER request.
>
> sipX will not send a REGISTER request with authentication info it it as it
> never receives the 401 with the realm and nonce which it needs to send an
> authenticated REGISTER request.
>
> Cheers,
> Dan
>
> --- On Fri, 5/15/09, Manoj Joshi <[email protected]> wrote:
>
>   
>> From: Manoj Joshi <[email protected]>
>> Subject: RE: [sipxtapi-dev] Register Unauthorized issue -- ven if correct
>>     
> Realm is specified
>   
>> To: [email protected], "Alexander Chemeris" <[email protected]>
>> Cc: [email protected]
>> Date: Friday, May 15, 2009, 9:33 AM
>> Hello Dan,
>>
>> Thank you for the reply. I made sure i am using correct
>> credentials. To
>> double check i used the same User with X-lite and it
>> registered instantly. I
>> am attaching the complete SIPXtapi log for your reference.
>>
>> Additionally i am also sending you all credentials here so
>> that you can
>> verify at your end as well may be by using it on SIpx
>> phone.
>>
>> 1. SIP Server IP: sip.checkcdr.com / 217.72.243.59
>>
>> 2. SIP Port: 5060
>>
>> 3. Test Account: 399917
>>
>> 4. Test PIN: 840759
>>
>> Plaese note that "217.72.243.59" is coming as Realm in 401
>> response.
>>
>> Regards,
>>
>> Manoj
>>
>> -----Original Message-----
>> From: Daniel Petrie [mailto:[email protected]]
>> Sent: Friday, May 15, 2009 6:33 PM
>> To: Alexander Chemeris; Manoj Joshi
>> Cc: [email protected]
>> Subject: Re: [sipxtapi-dev] Register Unauthorized issue --
>> ven if
>> correct Realm is specified
>>
>>
>>
>> Hi Manoj:
>> The trace you sent does not contain the re-REGISTER attempt
>> with the Auth
>> header and digest from sipX.  It has the original
>> REGISTER in it for Cseq
>> 101 twice.  Without that I can only guess at some
>> common issues people have
>> with configuration.
>>
>> Here is a guess at somethings that you can check.  The
>> first thing that I
>> would do would be to verify that you are using the correct
>> password AND more
>> importantly the correct user ID expected by the
>> server.  Some server use all
>> or different parts of the address of record (AOR) (e.g.
>> sip:[email protected],
>> 399917, [email protected])
>> for the
>> authentication user ID or completely different strings for
>> the user IDs for
>> authentication that do not contain any part of the
>> AOR.  Some servers use
>> multiple passwords (e.g. for different contexts). 
>> This can sometimes get
>> confusing.  If you are sure of these things, send me a
>> trace using a
>> password that you are willing to give out and I can check
>> the calculations
>> of the MD5 hash.
>>
>> Cheers,
>> Dan
>>
>> --- On Fri, 5/15/09, Manoj Joshi <[email protected]>
>> wrote:
>>
>>     
>>> From: Manoj Joshi <[email protected]>
>>> Subject: [sipxtapi-dev] Register Unauthorized issue --
>>>       
>> ven if correct
>> Realm is specified
>>     
>>> To: "Alexander Chemeris" <[email protected]>
>>> Cc: [email protected]
>>> Date: Friday, May 15, 2009, 3:53 AM
>>> Hello,
>>>
>>> I am using SIPXtapi and its working well with many of
>>>       
>> the
>>     
>>> SIP Servers. But
>>> with some proxy servers it does not registers.
>>>
>>> Detailed issue description
>>> ****************************
>>> 1- SIPXTapi sends register request (without
>>> WWW-Authenticate header)
>>> 2- SIP Proxy (Nextone) rejects register with 401
>>> Unauthorized.
>>> 3- SIPXtapi keeps on sending register request WITHOUT
>>> WWW-Authenticate
>>> header (I can see that Realm is correctly specified)
>>>
>>> Logs
>>> *******************
>>>
>>> First Register
>>> ++++++++++++++++
>>> "SipUserAgent::sendUdp UDP SIP User Agent sent
>>> message:\n----Remote
>>> Host:217.72.243.59---- Port: 5060----\nREGISTER
>>> sip:sip.checkcdr.com
>>> SIP/2.0\r\nFrom: sip:[email protected];tag=54c76b10\r\nTo:
>>> sip:[email protected]\r\ncall-id:
>>> 43686df6a892f0153535663565dc18a6\r\nCseq: 101
>>> REGISTER\r\nContact:
>>>
>>>       
>> <sip:[email protected]:16281;LINEID=1ab69e9e48d9>\r\nExpires:
>>     
>>> 3600\r\nDate:
>>> Fri, 15 May 2009 07:25:50 GMT\r\nMax-Forwards:
>>> 70\r\nUser-Agent:
>>> 399917\r\nAccept-Language: \r\nSupported:
>>>       
>> replaces\r\nVia:
>>     
>>> SIP/2.0/UDP
>>>
>>>       
>> 192.168.0.5:16281;branch=z9hG4bK-3bebc0f84853;rport\r\nContent-Length:
>>     
>> 0\r\n\r\n--------------------END--------------------\n"
>>     
>>> Reject Response
>>> ++++++++++++++++++
>>> "Read SIP message:\n----Remote Host:217.72.243.59----
>>> Port:
>>> 5060----\nSIP/2.0 401 Unauthorized\r\nVia:
>>>       
>> SIP/2.0/UDP
>>     
>> 192.168.0.5:16281;branch=z9hG4bK-3bebc0f84853;rport\r\nFrom:
>>     
>>> sip:[email protected];tag=54c76b10\r\nTo:
>>> sip:[email protected]\r\nwww-authenticate:
>>> Digest
>>> realm=\"217.72.243.59\", nonce=\"1242372372\",
>>> algorithm=MD5\r\nContent-Length:
>>>
>>>       
>> 0\r\n\r\n====================END====================\n"
>>     
>>> Fiurther Register and Reject messages
>>> +++++++++++++++++++++++++++++++++++++++++
>>> SIP User Agent sent message:\n----Remote
>>> Host:217.72.243.59---- Port:
>>> 5060----\nREGISTER sip:sip.checkcdr.com
>>>       
>> SIP/2.0\r\nFrom:
>>     
>>> sip:[email protected];tag=54c76b10\r\nTo:
>>> sip:[email protected]\r\ncall-id:
>>> 43686df6a892f0153535663565dc18a6\r\nCseq: 101
>>> REGISTER\r\nContact:
>>>
>>>       
>> <sip:[email protected]:16281;LINEID=1ab69e9e48d9>\r\nExpires:
>>     
>>> 3600\r\nDate:
>>> Fri, 15 May 2009 07:25:50 GMT\r\nMax-Forwards:
>>> 70\r\nUser-Agent:
>>> 399917\r\nAccept-Language: \r\nSupported:
>>>       
>> replaces\r\nVia:
>>     
>>> SIP/2.0/UDP
>>>
>>>       
>> 192.168.0.5:16281;branch=z9hG4bK-3bebc0f84853;rport\r\nContent-Length:
>>     
>> 0\r\n\r\n--------------------END--------------------\n"
>>     
>>> Read SIP message:\n----Remote Host:217.72.243.59----
>>>       
>> Port:
>>     
>>> 5060----\nSIP/2.0
>>> 401 Unauthorized\r\nVia: SIP/2.0/UDP
>>>
>>>       
>> 192.168.0.5:16281;branch=z9hG4bK-3bebc0f84853;rport\r\nFrom:
>>     
>>> sip:[email protected];tag=54c76b10\r\nTo:
>>> sip:[email protected]\r\nwww-authenticate:
>>> Digest
>>> realm=\"217.72.243.59\", nonce=\"1242372372\",
>>> algorithm=MD5\r\nContent-Length:
>>>
>>>       
>> 0\r\n\r\n====================END====================\n"
>>     
>>> Not able to understand whats wrong
>>>
>>> Regards,
>>>
>>> Manoj
>>>       
>>
>> --
>> Internal Virus Database is out-of-date.
>> Checked by AVG.
>> Version: 7.5.557 / Virus Database: 270.12.11/2089 - Release
>> Date: 4/30/2009
>> 5:53 PM
>>
>>
>>     
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.557 / Virus Database: 270.12.11/2089 - Release Date: 4/30/2009
> 5:53 PM
>
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
>
>   

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to