Hi All,<div>I have a issue where when i transfer a call using lua. It tells me that &quot;[WARNING] mod_dptools.c:976 No B-leg present.&quot;</div><div><br></div><div>Below you will find some background info:</div><div><br>
</div><div>@@@@@@@@@@ Log:</div><div><a href="http://pastebin.freeswitch.org/19458">http://pastebin.freeswitch.org/19458</a></div><div><br></div><div>@@@@@@@@@@  lua file relevant potions</div><div><div>##########      dx_script.lua ######################<table>
</table></div><div>session:setAutoHangup(false)</div><div><br></div><div>session:answer();</div><div>session:set_tts_parms(&quot;cepstral&quot;, &quot;amy&quot;);</div><div><br></div><div>-- session:execute(&quot;&quot;, &quot;&quot;)</div>
<div><br></div><div>digits = session:read(4, 11, &quot;tone_stream://%(10000,0,350,440)&quot;, 5000, &quot;#&quot;)</div><div>write_FS_LOG(&quot;Got dtmf: &quot;, digits)                                                                           </div>
<div>--freeswitch.consoleLog(&quot;info&quot;, &quot;Got dtmf: &quot;.. digits ..&quot;\n&quot;);</div><div>--session:execute(&quot;read&quot;, &quot;11 11 &#39;tone_stream://%(10000,0,350,440)&#39; digits 5000 #&quot;)</div>
<div>session:execute(&quot;export&quot;,&quot;orig_transfer_digits=&quot; .. digits)</div><div>session:setVariable(&quot;orig_transfer_digits&quot;, digits)</div><div>session:setVariable(&quot;orig_user_context&quot;,usr_context)</div>
<div>session:execute(&quot;export&quot;,&quot;orig_user_context=&quot; .. usr_context)</div><div>atoit = string.sub(dst_number, 4)</div><div>session:execute(&quot;transfer&quot;, &quot;is_transfer-&quot; .. atoit .. &quot; XML FEATURES&quot;)</div>
<div><br></div><div><br></div><div>write_FS_LOG(&quot;Script End Time: &quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div></div><div><br></div><div>############### is_transfer_script.lua ######################</div><div><div>
<br></div><div>if string.find(dst_number, &quot;-&quot;) ~= nil then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>dst_num_context_str = string.split(dst_number,&quot;-&quot;)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for dncs_index,dncs_str in pairs(dst_num_context_str) do</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>-- do some stuff</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>write_FS_LOG(&quot;DCNS Index&quot;, string.format(&quot;dcns_ind%s&quot;, dncs_index))</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>write_FS_LOG(&quot;DCNS VAR&quot;, string.format(&quot;%s&quot;, dncs_str))</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>session:setVariable(&quot;dcns_ind&quot; .. dncs_index, dncs_str)</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>orig_ucon = dncs_str</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>end</div><div>end</div><div>-- orig_ucon = session:getVariable(&quot;dcns_ind2&quot;)</div>
<div>-- orig_ucon = dcns_ind2</div><div>write_FS_LOG(&quot;orig_ucon&quot;, orig_ucon)</div><div><br></div><div>if orig_ucon == nil then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>write_FS_ERRLOG(&quot;Missing data&quot;, &quot;Missing user originating context&quot;)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>write_FS_LOG(&quot;Script End Time&quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>session:hangup()</div>
<div>else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>write_FS_LOG(&quot;Recieved Context - Continuing...&quot;, orig_ucon)</div><div>end</div><div><br></div><div>if session:getVariable(&quot;orig_transfer_digits&quot;) == nil then</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>write_FS_ERRLOG(&quot;Missing data&quot;, &quot;session:getVariable(orig_transfer_digits)&quot;)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>write_FS_LOG(&quot;Script End Time&quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>session:hangup()</div><div>else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>write_FS_LOG(&quot;Recieved digits - Continuing...&quot;, session:getVariable(&quot;orig_transfer_digits&quot;))</div>
<div>end</div><div><br></div><div>-- session:execute(&quot;info&quot;,&quot;&quot;)</div><div>-- session:execute(&quot;info&quot;,&quot;&quot;)</div><div><br></div><div>-- orig_user_context = session:getVariable(&quot;orig_user_context&quot;)</div>
<div>orig_transfer_digits = session:getVariable(&quot;orig_transfer_digits&quot;)</div><div><br></div><div>write_FS_LOG(&quot;Script: &quot;, &quot;regsrv is_transfer_script.lua&quot;)</div><div>write_FS_LOG(&quot;Script Start Time: &quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div>
<div>session:setAutoHangup(false)</div><div><br></div><div>session:answer();</div><div>session:set_tts_parms(&quot;cepstral&quot;, &quot;amy&quot;);</div><div><br></div><div>-- session:execute(&quot;&quot;, &quot;&quot;)</div>
<div><br></div><div>session:execute(&quot;transfer&quot;, &quot;-bleg &quot; .. orig_transfer_digits .. &quot; XML &quot; .. orig_ucon)</div><div><br></div><div><br></div><div>write_FS_LOG(&quot;Script End Time: &quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div>
</div><div><br></div><div><br></div><div>@@@@@@@@@@ dialplan&lt;document type=&quot;freeswitch/xml&quot;&gt;<table></table>  &lt;section name=&quot;dialplan&quot; description=&quot;FreeSWITCH Dialplan&quot;&gt;<table></table>
    &lt;context name=&quot;FEATURES&quot;&gt;<table></table>      &lt;extension name=&quot;DX&quot;&gt;<table></table>        &lt;condition field=&quot;destination_number&quot; expression=&quot;^DX-.*&quot;&gt;<table></table>
          &lt;action application=&quot;lua&quot; data=&quot;/fs/scripts/users/dx_script.lua&quot;/&gt;<table></table>        &lt;/condition&gt;<table></table>      &lt;/extension&gt;<table></table>      &lt;extension name=&quot;is_transfer&quot;&gt;<table>
</table>        &lt;condition field=&quot;destination_number&quot; expression=&quot;^is_transfer-.*&quot;&gt;<table></table>          &lt;action application=&quot;lua&quot; data=&quot;/fs/scripts/users/is_transfer_script.lua&quot;/&gt;<table>
</table>          &lt;anti-action application=&quot;eval&quot; data=&quot;cancel transfer&quot;/&gt;<table></table>        &lt;/condition&gt;<table></table>      &lt;/extension&gt;<table></table>    &lt;/context&gt;<table>
</table>  &lt;/section&gt;<table></table><table></table><br>&lt;/document&gt;<table></table></div><div></div>