[SR-Users] pua_xmpp questions

Daniel-Constantin Mierla miconda at gmail.com
Mon Aug 1 12:10:42 CEST 2011


Hello,

On 7/29/11 10:32 AM, laura testi wrote:
> Hi all,
> we are trying to setup a kamailio presence server in SIP/SIMPLE domain
> to interwork with XMPP domains including the GTalk (see the config
> below). The architecture is like this:
> - SIP/SIMPLE server: kamailio3.14 with full configuration with XCAP integration
> - XMPP Gateway: another kamailio server + ejabberd server
>      - component mode
>      - xmpp moduleL: outbound proxy to the Kamailio SIP/SIMPLE server
>      - pua_xmpp: no outbound proxy?
> - XMPP server: ejabberd
>
> The users from XMPP domain can add the SIP account and see the
> presence of the SIP users, but not vice versa. The chat from both
> directions works fine.
>
> in the Presence Server, we have configured the kamailio with XCAP
> integration. We have the following doubts:
> - does pua_xmpp/pua modules need the xcap integration for the presence
> integration with xmpp domains?
no, there is no requirement of xcap for sip-xmpp presence gatewaying.
>    because to use xcap for presence authorization rules, it needs the
> sip clients support the xcap
> - does pua_xmpp/pua support xcap? otherwise how to works?

This mechanism of auth rules in SIP is not compatible with XMPP, afaik. 
In xmpp they have in-band (using XMPP) transfer of the buddy list, 
unlike in SIMPLE where is XCAP over HTTP -- it is more like end-to-end 
presence model from early sip specifications.


> - in case of multiple SIP/SIMPLE presence server, how we can configure
> the server_address of
>    pua_xmpp and presence parameter in xmpp gw?

Either use many instances or, as workaround, somehow route the traffic 
to itself or other instance in order to re-write some headers.

Cheers,
Daniel


>
> Can you help us to clarify the doubts please?
>
> Many thanks in advanced!
>
> Best Regards,
> Laura
>
>
> PS: following are the main configuration of the xmpp GW:
> ---------------------------------------------------------------------------------------------
> ...
> modparam("xmpp", "domain_separator", "*")
> modparam("xmpp", "backend", "component")
> modparam("xmpp", "gateway_domain", "<mygwdomain>")
> modparam("xmpp", "xmpp_domain", "<mygwdomain>")
> modparam("xmpp", "xmpp_host", "127.0.0.1")
> modparam("xmpp", "xmpp_password", "secret")
> modparam("xmpp", "outbound_proxy", "<my oubound proxy uri>")
> modparam("pua", "outbound_proxy", "<my outbound proxy uri>")
> modparam("pua", "update_period", 60)
> modparam("pua", "default_expires", 1200)
> modparam("presence", "server_address", "<my presence server uri>")
> modparam("pua_xmpp", "server_address", "<my presence server uri>")
>
>
>
> route{
>    route(REQINIT);
>    t_check_trans();
> 	
>   if (uri =~ "sip:.+ at .*<myxmppdomain>") {
>      route(PRESENCE);
>      if ($rU==$null)
>      {
>        # request with no Username in RURI
>        sl_send_reply("484","Address Incomplete");
>        exit;
>      }
>      route(CHAT);
>    }
>
>   xlog("L_INFO", "*** xmpp: unhandled message type\n");
>   t_reply("503", "Service unavailable");
>   return;	
>
> }
>
> ...
>
> route[CHAT] {
> 	if(!is_method("MESSAGE"))
>              return;
>
> 	if (!t_newtran()) {
> 	   sl_reply_error();
> 	   exit;
> 	}
> 	  		
> 	xlog("L_INFO", "*** xmpp-handled MESSAGE message.");
> 	if ($cT=~"^text/plain") {		
> 		if (xmpp_send_message()) {
> 		  t_reply("200", "Accepted");
> 		} else {
> 		  t_reply("404", "Not found");
> 		}
> 	} else {
> 		xlog("L_INFO", "*** xmpp-handled MESSAGE, ignoring not text messages");
> 		t_reply("200", "Accepted");				
> 	}
> 	
> 	t_release();
> 	exit;
> }
>
> route[PRESENCE] {
>    if(!is_method("PUBLISH|SUBSCRIBE|NOTIFY"))
>      return;
>
>    # create new transaction to catch retransmissions
>    if (!t_newtran())
>    {
>      sl_reply_error();
>      exit;
>    }
>
>    if( is_method("NOTIFY"))
>    {
>      xlog("L_INFO", "*** xmpp-handled NOTIFY message.");
> 		if(pua_xmpp_notify())
> 			t_reply("200", "OK");
> 		t_release();
> 		exit;
>    } else if( is_method("SUBSCRIBE"))
> 	{
> 		xlog("L_INFO", "*** xmpp-handled SUBSCRIBE message.\n");
> 		handle_subscribe();
> 		if($(hdr(Event))== "presence")
> 		{
> 			pua_xmpp_req_winfo("$ruri", "$hdr(Expires)");
> 		}
> 		t_release();
> 		exit;
>   } else if(is_method("PUBLISH"))
>   {
>      handle_publish();
>      t_release();
>      exit;
>   }
> }
>
> ...
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list