Thank you very much Daniel! It works!
Following your suggestion, I have set the following parameters in the kamailio.cfg in both servers:
modparam("auth", "secret", "samesecretparam")
modparam("auth", "nonce_expire", 1800)
modparam("auth", "nonce_auth_max_drift", 300)
modparam("auth", "one_time_nonce", 0)
Now all xcap requests are authenticated successfully and works! Thanks again!
After some tests, now we are facing another problem with multiple presence servers integrated with XCAP servers in integrated mode. We have configured 2 kamailio servers as both presence server and xcap server with the same backend DB in another machine (thank you for your great guide on http://kb.asipto.com/kamailio:presence:k31-made-simple). In front we have setup a dispatcher for SIP load balancing and apache for http (xcap) load balancing.
It seems the presence server handle the publish/subscribe/notify events with the following tables:
- active_watchers (using local cache and update the local cache to db periodically)
- presentity (using local cache and update to db immediately)
- watchers (db)
- xcap (db)
we have meet 2 problems:
Hello,you have to set the same value to secret parameter of auth module:
On 6/28/11 6:33 PM, laura testi wrote:Hello all,
I’m using two Kamailio Presence Servers that are also XCAP Servers for the presence and resources management and the Kamailio Dispatcher in order to balance the SIP requestes coming from SIP Client.
Then I’m trying to configure a HTTP load–balancer for the xcap/http traffic.
I’m testing both Apache and INginx HTTP proxy but I’m facing with a problem related with the Xcap authentication:
when a client sends the first xcap request to the http load-balancer, it forwards the request to one of the configured Xcap Server that replies with the 401 response in order to let the client authenticates. So, the client sends the second request with the Digest authentication to the http load-balancer. But, sometimes, the http load-balancer forwards the authenticate request to the second Xcap Server that is not able to authenticate the request. Then the client receive the “Unauthorized” response…
Could you please give us some hints about this problem?
http://kamailio.org/docs/modules/stable/modules/auth.html#auth.secret
Also be sure the two servers have the same time (use ntp or so) and the one_time_nonce parameter to auth module is off (not enabled).
Then it should work.
Cheers,
Daniel
-- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda