Authentication Problem with Proxy

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

 



First of thanks of the reply Benny, and a "late reply" should be
considered something totally different, I'd say.
Below see my comments, because I still don't get a clue, what might be the
reason for this strange behaviour...

> 
>>
>> Hej,
>>
>> I face a little troublesome problem using PJSUA. I have just a little
> test
>> LAN,
>> including 2 hosts using PJSUA, one server running a SIP proxy including
> the
>> registerar.
>> The server as registrar as well as as Proxy requires authentication.
>> Now, if I make a call from one client to the other, having specified the
>> registrar and
>> the proxy. The config is like this:
>>
>> --id sip:first at domain.com <sip%3Afirst at domain.com>
>> --registrar:123.100.200.300:5060
>> --proxy:123.100.200.300:5060;lr
>> --realm *
>> --user first
>> --pword xyz
>>
>> --add-buddy sip:second at domain.com <sip%3Asecond at domain.com>
>>
>> (2nd config on the 2nd host vice versa, of course)
>>
>>
> Sorry for the late reply. The config above is not valid (registrar and
> proxy
> is not URI) but I think that's just typo since you said you can register
> successfully.
> 

Yes, you're right, I missed the "sip:"123.100.200.300:5060 in my example,
the real config shows it right and as said it works.

> 
> 
> So, registering works fine. If I look in Wireshark at the exchanged
>> messages,
>> everything works, the clients first send the INVITE message, a
> Status:407
>> "Proxy
>> Authentication Required" response comes back with the valid credentials,
>> they are filled into the new INVITE message and the registration is
>> successfully
>> completed.
>> So, that's the setup. Now I come to the point where I am going to
> establish
>> a call
>> between the both UA's. The proxy gets the INVITE message for the call,
>> telling me
>> (as before, see above) Status:407 "Proxy Authentication Required". So
> far I
>> get it.
>> The next (new) INVITE message is created, inclunding now the
> credentials,
>> and send
>> by the calling UA. It reaches the server, as I see in Wireshark, but no
>> more action
>> can be observed. My Wireshark messages (as the Debug output in PJSUA
> does
>> as well)
> 
> 
> Okay.
> 
> 
>>
>> looks like:
>>
>> (server==SVR/first host==FIR/second host==SND)
>>   Source  Desti.  Message
>> 1.  FIR     SRV    Request: INVITE
> sip:second at domain.com<sip%3Asecond at domain.com>,
>> with session description
>> 2.  SRV     FIR    Status: 100 Trying
>> 3.  SRV     FIR    Status: 407 "Proxy Authentication Required"
>> 4.  FIR     SRV    Request: ACK
> sip:second at domain.com<sip%3Asecond at domain.com>
>> 5.  FIR     SRV    Request: INVITE
> sip:second at domain.com<sip%3Asecond at domain.com>,
>> with session description
>> 6.  SRV     FIR    Status: 100 Trying
>> 7.  SRV     FIR    Status: 408 "Request timeout"
>> 8.  FIR     SRV    Request: ACK
> sip:second at domain.com<sip%3Asecond at domain.com>
>>
>> That is the whole message exchange. No INVITE ever reaches the second
> host.
>> I tried
>> several approaches, also entering the realm by hand, not using the
>> wildcard, using
>> IP addresses in the sip:URI. Absolutely no success. I checked, if the
>> gained
>> credentials are exactly the same, and they match. The network setup
> works
>> just fine,
>> when there is now authentication in the proxy. I really wonder why? I am
>> pretty new to
>> PJSIP, so I might lack the important part what I am doing wrong.
>>
>>
> Actually from client/PJSIP point of view, there don't seem to be any
> problems there, i.e. it does what it's supposed to do. It's the server
> that
> fails to forward the request, so you should troubleshoot the server
> instead.

Yes, was my first guess as well, but I tried it with a colleague and other clients,
and they just work with and without authentication enabled at the proxy. And
it gets even better. When I try calling from one PJSUA to another SIP-client(not
PJSUA), the connection establishes. The other way round, calling from some other
open-source or proprietary to PJSUA works as well, just PJSUA to PJSUA in this
case gives me the trouble. Doesn't make sense at all, I think. But maybe I am
stuck a little bit too much in my way of thinking now and miss some experience
with SIP at all?

> 
> Common reasons for this problem are unreachable Contact address registered
> by callee (although it doesn't seem to be the problem here since you can
> call it when authentication is disabled), or the INVITE packet is too big
> that it doesn't pass certain router. Not sure if this applies to your
> problem though.
>
>  -benny
>

The first I think shouldn't be the reason, because as you stated, it works for
other applications and for PJSUA without authentication.
The latter I don't know. How can the INVITE bee too long/big? And by the way,
there is no router in the network, just a switch.
Another thing is, I compile my source with VS2008, sadly I can't use the SVN Trunk,
so maybe I try to get my hands on the latest code and try it again, but not sure if
it will be as easy as that. I'll let you guys know. 

Thanks again and not to forget, you do a pretty great job here!
And if anyone else experienced some problems with this, I welcome every help.

Markus





[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