提交 3d9ad0a3 authored 作者: Jonas Gauffin's avatar Jonas Gauffin

Removed the use of call leg variables in originate since session variables…

Removed the use of call leg variables in originate since session variables really can't be assigned in the form {global vars}[local vars]targetA targetB. Well, its fixed now.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/contrib@12900 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 28a2dc0a
......@@ -85,27 +85,20 @@ namespace FreeSwitch.EventSocket.Commands
if (_autoAnswer)
{
_variables.Add(new CallLegVariable("sip_invite_params", "intercom=true"));
_variables.Add(new CallLegVariable("sip_h_Call-Info", "<sip:$${domain}>;answer-after=0"));
_variables.Add(new CallLegVariable("sip_auto_answer", "true"));
/*_variables.Add(new CallVariable("sip_invite_params", "intercom=true"));*/
_variables.Add(new CallVariable("sip_h_Call-Info", "answer-after=0"));
_variables.Add(new CallVariable("sip_auto_answer", "true"));
}
}
string variables = string.Empty;
string legVariables = string.Empty;
foreach (CallVariable var in _variables)
{
if (var is CallLegVariable)
legVariables += var + ",";
else
variables += var + ",";
}
if (variables.Length > 0)
variables = "{" + variables.Remove(variables.Length - 1, 1) + "}";
if (legVariables.Length > 0)
legVariables = "[" + legVariables.Remove(legVariables.Length - 1, 1) + "]";
return variables + legVariables + Caller + " " + Destination;
return variables + Caller + " " + Destination;
}
}
......
......@@ -91,7 +91,6 @@
<Compile Include="Events\EventHeartbeat.cs" />
<Compile Include="Events\EventReSchedule.cs" />
<Compile Include="General\Address.cs" />
<Compile Include="General\CallLegVariable.cs" />
<Compile Include="General\SipAddress.cs" />
<Compile Include="General\SofiaSipAddress.cs" />
<Compile Include="PartyInfo.cs" />
......
namespace FreeSwitch.EventSocket.General
{
/// <summary>
/// Variable stored only for a specific leg.
/// </summary>
/// <remarks>
/// Channel variables are used in FreeSWITCH to store information
/// that can be used by JavaScript programs.
/// </remarks>
public class CallLegVariable : CallVariable
{
/// <summary>
/// Initializes a new instance of the <see cref="CallLegVariable"/> class.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="value">The value.</param>
public CallLegVariable(string name, string value) : base(name, value)
{
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论