I honestly don&#39;t mean to be a smart alleck, but the warning &quot;No B-leg present&quot; is exactly what is wrong. This is a one-legged call into a Lua script, therefore there is only the A-leg. That means this line is incorrect:<br>
<br>session:execute(&quot;transfer&quot;, &quot;-bleg &quot; .. orig_transfer_digits .. &quot; XML &quot; .. orig_ucon)<br><br>The session that the Lua script is controlling is not bridged to another leg (which would be the B-leg) and so there is no reason to try and transfer the B-leg. Perhaps you could just do a simple transfer?<br>
<br>-MC<br><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 7:07 PM, KPS Maillinglist <span dir="ltr">&lt;<a href="mailto:ksims.ml@gmail.com" target="_blank">ksims.ml@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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" target="_blank">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 style="white-space:pre-wrap">        </span>dst_num_context_str = string.split(dst_number,&quot;-&quot;)</div><div><span style="white-space:pre-wrap">        </span>for dncs_index,dncs_str in pairs(dst_num_context_str) do</div>

<div><span style="white-space:pre-wrap">                </span>-- do some stuff</div><div><span style="white-space:pre-wrap">                </span>write_FS_LOG(&quot;DCNS Index&quot;, string.format(&quot;dcns_ind%s&quot;, dncs_index))</div>
<div><span style="white-space:pre-wrap">                </span>write_FS_LOG(&quot;DCNS VAR&quot;, string.format(&quot;%s&quot;, dncs_str))</div><div><span style="white-space:pre-wrap">                </span>session:setVariable(&quot;dcns_ind&quot; .. dncs_index, dncs_str)</div>

<div><span style="white-space:pre-wrap">                </span>orig_ucon = dncs_str</div><div><span style="white-space:pre-wrap">        </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 style="white-space:pre-wrap">        </span>write_FS_ERRLOG(&quot;Missing data&quot;, &quot;Missing user originating context&quot;)</div>

<div><span style="white-space:pre-wrap">        </span>write_FS_LOG(&quot;Script End Time&quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div><div><span style="white-space:pre-wrap">        </span>session:hangup()</div>
<div>else</div><div><span style="white-space:pre-wrap">        </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 style="white-space:pre-wrap">        </span>write_FS_ERRLOG(&quot;Missing data&quot;, &quot;session:getVariable(orig_transfer_digits)&quot;)</div><div><span style="white-space:pre-wrap">        </span>write_FS_LOG(&quot;Script End Time&quot;, os.date(&quot;%Y-%m-%d %X&quot;))</div>

<div><span style="white-space:pre-wrap">        </span>session:hangup()</div><div>else</div><div><span style="white-space:pre-wrap">        </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>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>