Skip to content
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

Check to make sure accountcode has some value #6440

Merged
merged 1 commit into from Jul 22, 2022

Conversation

emaktech
Copy link
Contributor

The accountcode variable is used in a dialstring later on and if it comes back nil for any reason, then the following error is thrown:

2022-07-22 16:19:11.524674 [ERR] mod_lua.cpp:202 /usr/share/freeswitch/scripts/app/follow_me/index.lua:396: attempt to concatenate global 'accountcode' (a nil value)
stack traceback:
        /usr/share/freeswitch/scripts/app/follow_me/index.lua:396: in main chunk
        /usr/share/freeswitch/scripts/app.lua:48: in main chunk

This completely breaks follow-me.

This code sets the accountcode variable to the domain name if it comes back nil during script execution, thus protecting the script from failing with an empty accountcode value in the db or query.

The accountcode variable is used in a dialstring later on and if it comes back nil for any reason, then the following error is thrown:

2022-07-22 16:19:11.524674 [ERR] mod_lua.cpp:202 /usr/share/freeswitch/scripts/app/follow_me/index.lua:396: attempt to concatenate global 'accountcode' (a nil value)
stack traceback:
        /usr/share/freeswitch/scripts/app/follow_me/index.lua:396: in main chunk
        /usr/share/freeswitch/scripts/app.lua:48: in main chunk

This completely breaks follow-me.

This code sets the accountcode variable to the domain name if it comes back nil during script execution, thus protecting the script from failing with an empty accountcode value in the db or query.
@markjcrane markjcrane merged commit ea4a5e7 into fusionpbx:master Jul 22, 2022
@emaktech emaktech deleted the patch-14 branch August 19, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants