<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hello!<br>
<br>
Basically merging the two separate configs together should do the
trick. If you follow this[1] example, change your Proxy config as
it follows:<br>
<br>
When an initial INVITE comes in, create the dialog and publish the
information:<br>
</tt><br>
<tt>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre class="escaped" style="font-size: 0.9em; font-family: "Lucida Console", "Andale Mono", "Courier New", Courier; margin-top: 0px; margin-bottom: 0px; padding: 6px; border: 1px solid rgb(235, 235, 235); background-color: rgb(251, 254, 250); color: rgb(102, 102, 102); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> if (is_method("INVITE")) {
create_dialog();
# publish for both legs
dialoginfo_set("AB");
}</pre>
<br>
When a publish or subscribe methods come in handle them
accordingly:<br>
</tt><tt>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre class="escaped" style="font-size: 0.9em; font-family: "Lucida Console", "Andale Mono", "Courier New", Courier; margin-top: 0px; margin-bottom: 0px; padding: 6px; border: 1px solid rgb(235, 235, 235); background-color: rgb(251, 254, 250); color: rgb(102, 102, 102); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><tt>...
</tt>if (is_method("PUBLISH|SUBSCRIBE")) {
route(handle_presence);
exit;
}
<tt>...
</tt><meta http-equiv="content-type" content="text/html; charset=utf-8">route[handle_presence]
{
if(!t_newtran()){
sl_reply_error();
exit;
}
if (is_method("PUBLISH")) {
handle_publish();
} else
if (is_method("SUBSCRIBE")) {
handle_subscribe();
}
exit;
}
</pre>
[1] <a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Tutorials-Presence-PuaDialoinfoConfig">http://www.opensips.org/Documentation/Tutorials-Presence-PuaDialoinfoConfig</a>
PS: Please subscribe on the mailing list, otherwise you will loose further replies
</tt><pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre><div class="moz-cite-prefix">On 01/03/2017 10:13 AM, maatohewetbi wrote:
</div><blockquote cite="mid:1483431205315-7605411.post@n2.nabble.com" type="cite"><pre wrap="">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: <a class="moz-txt-link-freetext" href="http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411.html">http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411.html</a>
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body></html>