[pjsip] Authentication Problem with Proxy

Markus list at mail.mafis-ing.de
Wed Jul 23 10:45:57 EDT 2008


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
--realm *
--user first
--pword xyz

--add-buddy sip:second at domain.com

(2nd config on the 2nd host vice versa, of course)

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
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)
looks like:

(server==SVR/first host==FIR/second host==SND)
   Source  Desti.  Message 
1.  FIR     SRV    Request: INVITE sip:second 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
5.  FIR     SRV    Request: INVITE sip:second 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

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.

Please if you have an idea, give me a hint, every help is appreciated.
Greets, Markus

More information about the pjsip mailing list