<div>One thing that might be asked of you is what version of OpenSIPS are you running.  I think there have been some updates that fixed some b2b issues.  Also I believe that  in order for you to use b2b the SIP message cannot have a ToTag.</div>

<div> </div>
<div>You have to use B2B like so</div>
<div> </div>
<div>
<div>if(is_method(&quot;INVITE&quot;) &amp;&amp; !(src_ip == &quot;OPENSIPS_IP&quot;) &amp;&amp; !has_totag() ) {</div>
<div>{</div>
<div>    location();</div>
<div>    b2b_init_request(&quot;refer&quot;);<br>    exit;</div>
<div>}<br><br></div></div>
<div class="gmail_quote">On Tue, Dec 28, 2010 at 11:20 AM, Anton Zagorskiy <span dir="ltr">&lt;<a href="mailto:a.zagorskiy@oyster-telecom.ru">a.zagorskiy@oyster-telecom.ru</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi.<br><br>I&#39;m trying to use b2b refer scenario<br><a href="http://www.opensips.org/Resources/B2buaTutorial#toc15" target="_blank">http://www.opensips.org/Resources/B2buaTutorial#toc15</a><br>
But I&#39;ve got errors in the log:<br><br>*** route: REFER request, call B2B(refer)<br>DBG:core:parse_headers: flags=ffffffffffffffff<br>DBG:b2b_logic:b2bl_insert_new: new tuple [0xb60c1238]-&gt;[468.0]<br>DBG:core:parse_headers: flags=ffffffffffffffff<br>
ERROR:b2b_entities:b2b_new_dlg: Called b2b_init on a Cancel message<br>ERROR:b2b_entities:server_new: failed to create new dialog structure entry<br>ERROR:b2b_logic:b2b_process_scenario_init: failed to create new b2b server<br>
instance<br>DBG:b2b_logic:b2bl_delete: Delete record [0xb60c1238]-&gt;[468.0],<br>hash_index=[468], local_index=[0]<br>*** route: REFER request, B2B(refer) called, exit<br><br>I&#39;m catching REFER in a loose_route section:<br>
<br>if (has_totag())<br>{<br>       if (loose_route())<br>     {<br>       if ( ($DLG_status != NULL) &amp;&amp; (!validate_dialog()) )<br>           {<br>               xlog(&quot;*** !!! [ROUTE]: bad dialog&quot;);<br>           }<br>
           else<br>           {<br>               if (is_method(&quot;REFER&quot;))<br>                 {<br>                       xlog(&quot;*** route: REFER request, call B2B(refer)&quot;);<br>                       b2b_init_request(&quot;refer&quot;);<br>
                       xlog(&quot;*** route: REFER request, B2B(refer) called,<br>exit&quot;);<br>                       exit;<br>                   };<br><br>                                       ...<br><br>           };<br>
       };<br>};<br><br><br>What I&#39;m doing wrong?<br><br><br><br>WBR, Anton Zagorskiy<br>VoIP Developer, Oyster Telecom<br>Phone.: +7 812 601-0666<br>Fax: +7 812 601-0593<br><a href="mailto:a.zagorskiy@oyster-telecom.ru">a.zagorskiy@oyster-telecom.ru</a><br>
<a href="http://www.oyster-telecom.ru/" target="_blank">www.oyster-telecom.ru</a><br><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><br><br clear="all"><br>-- <br>--<br>*--*--*--*--*--*<br>
Duane<br>*--*--*--*--*--*<br>--<br>