<p>That's a very good explanation and would be good to have on the b2b module pages or somewhere. </p>
<p>As for my problem I was able to solve it but still wanted to hear what someone had to say about my question. I found another post where someone solved a similar issue by using the localcache module and cache store and cache fetch. </p>
<p>Thanks for the heads up on what to expect with b2b and how it works with the other modules.</p>
<div class="gmail_quote">On Apr 20, 2012 7:29 PM, "Ovidiu Sas" <<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This topic comes back again and again ...<br>
It should be really documented in the wiki somewhere.<br>
<br>
OpenSIPS can operate in two different modes:<br>
- proxy,<br>
- back to back user agent.<br>
<br>
The two modes of operations are exclusive and modules that are bind to<br>
one mode of operation are more or less incompatible with the other<br>
mode. The dialog module is tightly coupled with the proxy mode and<br>
therefore is totally incompatible with the b2b mode. Most of the<br>
modules were designed based on the assumption that opensips is running<br>
in proxy mode and as a result, most of them are more or less (leaning<br>
towards more) incompatible with b2b mode.<br>
To be more precise, whatever operation that can be done in proxy mode<br>
before calling t_relay() and doesn't have a dependency on t_relay to<br>
complete, is safe to be use in b2b mode.<br>
For instance, routing can be done using whatever routing method one<br>
might prefer (dispatcher, drouting, ...) before initiating the call in<br>
b2b mode, but once the call is initiated in b2b mode, all the<br>
subsequent routing failover mechanisms are discarded (because of<br>
dependency on t_relay() - proxy routing mode - dealing all the time<br>
with the initial transaction). In b2b mode, we are dealing with two<br>
transactions: the incoming one and the outgoing one and things are<br>
becoming more complex.<br>
<br>
Hope this brings a little bit of light in what can be and what cannot<br>
be done while routing calls in b2b mode.<br>
In the future, modules could be enhanced to be both proxy and b2b<br>
friendly, but that requires quite a bit of work: design and<br>
implementation.<br>
<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
--<br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a><br>
<br>
<br>
On Fri, Apr 20, 2012 at 6:22 PM, Duane Larson <<a href="mailto:duane.larson@gmail.com">duane.larson@gmail.com</a>> wrote:<br>
> Is it possible to keep a persistent variable throughout a dialog when using<br>
> the B2B module? I tried the Dialog modules (set_dlg_flag() and<br>
> is_dlg_flag_set()) and $dlg_val variable but none worked. Not sure why.<br>
><br>
> route[b2b_request] {<br>
><br>
> if (search_body("a=sendonly") && method == "INVITE"){<br>
> xlog("SEARCHING: rm [$rm] BING BING FOUND IT\n");<br>
><br>
> create_dialog();<br>
><br>
> $dlg_val("IsHolding") = "1";<br>
><br>
> # set_dlg_flag("3");<br>
> };<br>
><br>
> $var(IsHolding) = $dlg_val("IsHolding");<br>
> xlog("************************************************* var is<br>
> [$var(IsHolding)] and call is rm [$rm]\n");<br>
> #if (is_dlg_flag_set("3") && method == "ACK"){<br>
> if ($var(IsHolding) == "1" && method == "ACK"){<br>
> xlog("***********SEARCHING***********: rm [$rm] WE HAVE AN<br>
> ACK and VarISHolding equals one\n");<br>
> };<br>
><br>
> }<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>