[OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server

Răzvan Crainea razvan at opensips.org
Tue Jan 3 03:40:22 EST 2017


Hello!

Basically merging the two separate configs together should do the trick. 
If you follow this[1] example, change your Proxy config as it follows:

When an initial INVITE comes in, create the dialog and publish the 
information:

	if (is_method("INVITE")) {
		create_dialog();
		# publish for both legs
		dialoginfo_set("AB");
	}


When a publish or subscribe methods come in handle them accordingly:

... if (is_method("PUBLISH|SUBSCRIBE")) {
		route(handle_presence);
		exit;
	}
... route[handle_presence]
{
	if(!t_newtran()){
		sl_reply_error();
		exit;
	}

	if (is_method("PUBLISH")) {
		handle_publish();
	} else

	if (is_method("SUBSCRIBE")) {
		handle_subscribe();
	}

	exit;
}

[1] 
http://www.opensips.org/Documentation/Tutorials-Presence-PuaDialoinfoConfig 
PS: Please subscribe on the mailing list, otherwise you will loose 
further replies

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/03/2017 10:13 AM, maatohewetbi wrote:
> I use Opensips 1.6.2 on my server. I want to add BLF function to it but I
> don't know how. I have config where I route calls to asterisk. There are
> tutorials where I can set Opensip Presence Server as standalone, with
> OpenXcap as well, but there's nowhere config how to set Opensips to work on
> one machine as Presence Server, and also as a Proxy at same Opensips
> instance - in one config. How can I make it? Ok, I can set one Opensips as a
> proxy, and other Opensips (on another machine) as a Presence Server. But how
> can I connect them so that they work together?
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170103/b0eaf32d/attachment.html>


More information about the Users mailing list