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).
thanks
public class Answering : IAppPlugin
{
ManagedSession Session;
public void Run(AppContext context)
{
Session = context.Session;
Session.HangupFunction = hangupHook;
if (. . .) //no operator available wai
{
Session.Answer();
if (Session.Ready())
{
Session.StreamFile(m_sorryPrompt, -1);
Session.SetVariable("sepanta_prompt_ended","true");
Session.StreamFile(m_musicOnHold, -1);
}
}//now u can talk
if (Session.Ready())
{
string ticket = "1234";
if (!Session.answered())
Session.Answer();
Session.Say(ticket, "en", "NUMBER", "PRONOUNCED", "FEMININE");
Session.Execute("Playback",m_readyPrompt);
Session.SetVariable("exec_after_bridge_app", "record_session");
Session.SetVariable("exec_after_bridge_arg", recPath);
Session.Execute("bridge",string.Format("sofia/internal/{0}%{1}", op, Session.GetVariable("domain")));
}
}