提交 824e1a59 authored 作者: Michael Jerris's avatar Michael Jerris

fix in tree scripts to match changed state names. (FSCORE-119)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/contrib@8266 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2f28c081
...@@ -138,7 +138,7 @@ while (1) { ...@@ -138,7 +138,7 @@ while (1) {
} elsif (watchedChannel($myhash->{'channel-name'})) { } elsif (watchedChannel($myhash->{'channel-name'})) {
if ($myhash->{'event-name'} eq "CHANNEL_ANSWER") { ## deal with answers if ($myhash->{'event-name'} eq "CHANNEL_ANSWER") { ## deal with answers
do_answer($myhash); do_answer($myhash);
} elsif ($myhash->{'event-name'} eq "CHANNEL_STATE" && $myhash->{'channel-state'} eq "CS_RING") { } elsif ($myhash->{'event-name'} eq "CHANNEL_STATE" && $myhash->{'channel-state'} eq "CS_ROUTING") {
do_ring($myhash); do_ring($myhash);
} elsif ($myhash->{'event-name'} eq "CHANNEL_HANGUP") { ## last thing done on a channel } elsif ($myhash->{'event-name'} eq "CHANNEL_HANGUP") { ## last thing done on a channel
do_hangup($myhash); do_hangup($myhash);
......
...@@ -60,7 +60,7 @@ namespace EventWatcher ...@@ -60,7 +60,7 @@ namespace EventWatcher
if (theEvent is EventPresenceIn) if (theEvent is EventPresenceIn)
{ {
EventPresenceIn ep = (EventPresenceIn) theEvent; EventPresenceIn ep = (EventPresenceIn) theEvent;
//Channel-State: CS_RING //Channel-State: CS_ROUTING
//Channel-Name: sofia/default/jonas%40192.168.1.102%3A5070 //Channel-Name: sofia/default/jonas%40192.168.1.102%3A5070
//Unique-ID: 2f87ba27-2f71-d64d-8c64-9966ee894eac //Unique-ID: 2f87ba27-2f71-d64d-8c64-9966ee894eac
//Call-Direction: inbound //Call-Direction: inbound
...@@ -68,7 +68,7 @@ namespace EventWatcher ...@@ -68,7 +68,7 @@ namespace EventWatcher
//Event-Name: PRESENCE_IN //Event-Name: PRESENCE_IN
CallState state = CallState.Unknown; CallState state = CallState.Unknown;
string destination = string.Empty; string destination = string.Empty;
if (ep.ChannelState.ChannelInfo.State == ChannelState.Ring) if (ep.ChannelState.ChannelInfo.State == ChannelState.Routing)
{ {
if (IsInbound(ep)) if (IsInbound(ep))
{ {
......
...@@ -3,16 +3,16 @@ namespace FreeSwitch.EventSocket ...@@ -3,16 +3,16 @@ namespace FreeSwitch.EventSocket
#region enum ChannelState #region enum ChannelState
public enum ChannelState public enum ChannelState
{ {
New, // Channel is newly created New, // Channel is newly created
Init, // Channel has been initilized Init, // Channel has been initilized
Ring, // Channel is looking for a dialplan Routing, // Channel is looking for a dialplan
Transmit, // Channel is in a passive transmit state SoftExecute // Channel is in a passive transmit state
Execute, // Channel is executing it's dialplan Execute, // Channel is executing it's dialplan
Loopback, // Channel is in loopback ExchangeMedia, // Channel is exchanging media
Hold, // Channel is on hold ConsumeMedia, // Channel is consuming media
Hibernate, // Channel is in a sleep state Hibernate, // Channel is in a sleep state
Hangup, // Channel is flagged for hangup and ready to end Hangup, // Channel is flagged for hangup and ready to end
Done, // Channel is ready to be destroyed and out of the state machine Done, // Channel is ready to be destroyed and out of the state machine
Unknown Unknown
} }
#endregion #endregion
...@@ -205,11 +205,11 @@ namespace FreeSwitch.EventSocket ...@@ -205,11 +205,11 @@ namespace FreeSwitch.EventSocket
{ {
case "CS_NEW": return ChannelState.New; case "CS_NEW": return ChannelState.New;
case "CS_INIT": return ChannelState.Init; case "CS_INIT": return ChannelState.Init;
case "CS_RING": return ChannelState.Ring; case "CS_ROUTING": return ChannelState.Routing;
case "CS_TRANSMIT": return ChannelState.Transmit; case "CS_SOFT_EXECUTE": return ChannelState.SoftExecute;
case "CS_EXECUTE": return ChannelState.Execute; case "CS_EXECUTE": return ChannelState.Execute;
case "CS_LOOPBACK": return ChannelState.Loopback; case "CS_EXCHANGE_MEDIA": return ChannelState.ExchangeMedia;
case "CS_HOLD": return ChannelState.Hold; case "CS_CONSUME_MEDIA": return ChannelState.ConsumeMedia;
case "CS_HIBERNATE": return ChannelState.Hibernate; case "CS_HIBERNATE": return ChannelState.Hibernate;
case "CS_HANGUP": return ChannelState.Hangup; case "CS_HANGUP": return ChannelState.Hangup;
case "CS_DONE": return ChannelState.Done; case "CS_DONE": return ChannelState.Done;
......
...@@ -34,7 +34,7 @@ namespace FreeSwitch.EventSocket ...@@ -34,7 +34,7 @@ namespace FreeSwitch.EventSocket
} }
/// <summary> /// <summary>
/// Caller is only specified on state CS_RING /// Caller is only specified on state CS_ROUTING
/// and not on CS_HANGUP /// and not on CS_HANGUP
/// </summary> /// </summary>
public PartyInfo Caller public PartyInfo Caller
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论