freeswitch/scripts/socket/freepy/bgapirequest.sm
2007-10-07 16:47:10 +00:00

72 lines
853 B
Plaintext

%start MainMap::Startup
%class BgApiRequest
%map MainMap
%%
Startup
{
CommandReply
ApiResponseStarted
{
}
}
ApiResponseStarted
{
ReplyText
GotReplyText
{
}
}
GotReplyText
{
BlankLine
Startup
{
setRequestFinished(); callOrErrback();
}
}
Default
{
BlankLine
nil
{
setRequestFinished();
errbackDeferred("Protocol failure");
}
CommandReply
nil
{
setRequestFinished();
errbackDeferred("Protocol failure");
}
ReplyText
nil
{
setRequestFinished();
errbackDeferred("Protocol failure");
}
ProcessLine(line)
nil
{
setRequestFinished();
errbackDeferred("Protocol failure");
}
}
%%