freeswitch/scripts/socket/freepy/bgapirequest.sm

72 lines
998 B
Plaintext
Raw Normal View History

%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 - was not expecting blank line");
}
CommandReply
nil
{
setRequestFinished();
errbackDeferred("Protocol failure - was not expecting command reply");
}
ReplyText
nil
{
setRequestFinished();
errbackDeferred("Protocol failure - was not expecting reply text");
}
ProcessLine(line)
nil
{
setRequestFinished();
errbackDeferred("Protocol failure - was not expecting line needing to be processed");
}
}
%%