Look here:<br><a href="http://wiki.freeswitch.org/wiki/Channel_Variables#Code_Execution_Related">http://wiki.freeswitch.org/wiki/Channel_Variables#Code_Execution_Related</a><br><br>There are some options for executing apps on either A or B leg just prior to media being exchanged. <br>
<br>-MC<br><br><div class="gmail_quote">On Fri, May 7, 2010 at 7:32 AM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com">pjintheusa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<h3 style="font-weight: normal;"><span>exec_after_bridge_app = </span>Execute an application command after the bridge has been terminated</h3><a href="http://wiki.freeswitch.org/wiki/Variable_exec_after_bridge_arg" target="_blank">http://wiki.freeswitch.org/wiki/Variable_exec_after_bridge_arg</a><br>
<br>Not sure when the correct call would be though....<br><h3><span><span style="font-weight: normal;">execute_on_answer ??</span><br></span></h3><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Fri, May 7, 2010 at 2:36 AM, babak yakhchali <span dir="ltr"><<a href="mailto:babak.freeswitch@gmail.com" target="_blank">babak.freeswitch@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5"><div>Hi I'm using the code below to dispatch customers to operators in c#. everything is fine but recording is not taking place(I've tested both the hang up after bridge false and true).</div>
<div>thanks</div><div>
public class Answering : IAppPlugin</div><div> {</div><div><br></div><div> ManagedSession Session; </div><div> public void Run(AppContext context)</div><div> { </div><div> Session = context.Session;</div>
<div> Session.HangupFunction = hangupHook;</div><div> </div><div> if (. . .) //no operator available wai</div><div> {</div><div> Session.Answer();</div><div>
if (Session.Ready())</div><div> {</div><div> Session.StreamFile(m_sorryPrompt, -1);</div><div> Session.SetVariable("sepanta_prompt_ended","true"); </div>
<div> Session.StreamFile(m_musicOnHold, -1);</div><div> } </div><div> }//now u can talk</div><div> if (Session.Ready())</div><div> { </div>
<div> string ticket = "1234";</div><div> if (!Session.answered())</div><div> Session.Answer();</div><div> Session.Say(ticket, "en", "NUMBER", "PRONOUNCED", "FEMININE"); </div>
<div> Session.Execute("Playback",m_readyPrompt); </div><div> Session.SetVariable("exec_after_bridge_app", "record_session");</div><div> Session.SetVariable("exec_after_bridge_arg", recPath);</div>
<div> Session.Execute("bridge",string.Format("sofia/internal/{0}%{1}", op, Session.GetVariable("domain")));</div><div> }</div><div> }</div>
<br></div></div><div class="im">_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></div></blockquote></div><br>
<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>