-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AGIChannel and LastReply #120
Comments
In what context are you using LastReply? I've not seen any issues myself during normal operation. Are you trying to manually query some result? |
I haven't used LastReply. I have faced with situation when i sent "Exec Dial" and expected result of this command but i have got result of the command "get variable" which I have sent next. I have removed field and rewrite logic to use return value of SendCommand and problem was left. |
We've actually come across this issue. We fire just over 6 million events a month, of which about a thousand had this issue. It's when we push high volumes that this happens. Essentially this is how we retrieved parameters: public static string GetVariable(AGIChannel channel, string name)
{
channel.SendCommand(new AsterNET.FastAGI.Command.GetVariableCommand(name));
if (channel.LastReply.ResultCode != 1)
return null;
return channel.LastReply.Extra;
} We've actually ended up replacing this with a REST call to Asterisk (when fetching multiple parameters we simply fetch them all in parallel). I would however love to know how the above issue occurs? |
I have changed 2 files - AGIChannel and AGIScript. Please check this fix in your side. |
@orastarter please submit changes as a PR and not a ZIP file. We can't accept any code submitted in any other way then a PR using git. |
@skrusty, how can i make PR? I have tried to create branch but i can't publish it: |
@orastarter, you need to first make your own fork, then make your changes on that fork. Once the fork has your changes you then make a pull request from it to this main repository |
@Deantwo Thank you! Next step find VS2017 :) |
Hi!
I have faced with bad situation. AGIChannel.LastReply could contain AGIReplay for another AGICommand. I think it is much better to remove field agiReply from AGIChannel and use return value from method SendCommand.
Thank you!
The text was updated successfully, but these errors were encountered: