Astpp.lua: No such file or directory

When trying to dial out I am seeing:

2023-08-03 19:20:41.827476 98.23% [ERR] mod_lua.cpp:202 cannot open /usr/share/freeswitch/scripts/astpp/astpp.lua: No such file or directory
2023-08-03 19:20:41.827476 98.23% [ERR] mod_lua.cpp:269 LUA script parse/execute error!

That directory does not exist.

According to the install script, astpp.lua is being copied into /var/lib/astpp/

But looking for the non existent directory in the configuration files, I see it can be located in


Changing that from /usr/share/freeswitch/scripts/astpp/astpp.lua to /var/lib/astpp/astpp.lua and restarting FreeSwitch results in no change.

I recall it was mentioned some configurations are placed in the database, but I am not seeing anything were such a setting would be located.

I don’t know what the install script does but my manual procedure that reproduces it does this.

ln -s /opt/ASTPP/freeswitch/scripts/ /usr/share/freeswitch

My procedure also copies over autoload_configs so you should already have those copied as well.

cp -rf ASTPP/freeswitch/conf/autoload_configs/* /etc/freeswitch/autoload_configs/

Is this a case of you compiling freeswitch from source again? When you do that freeswitch installs files in different directories compared to what installing it from repo does. You should either install from repo or adjust your compile procedure so that freeswitch files are installed in the same directories.

These are all the relevant directories used by freeswitch when installed from repo.


If you compile from source I think the first three default directories will be different so you should adjust your compile command to change those directories.

You also need to pay attention to what user freeswitch runs as. I don’t know what the install script uses but I set it to run as the apache user. In the case of Debian that is www-data. You also need to make sure you set your permissions accordingly. You can see all of those details in the install script.

I gave up compiling until I could get a fully functioning system and understood everything a bit better.

I did base my own script on theirs. Just must some changes to things I did not like in theirs. For example, having the option to install postfix instead of sendmail, or removing telemetry.

Anyway, I see symbolic link you asked me to create already exists.

I also see their script does include:

cp -rf /optASTPP/freeswitch/conf/autoload_configs/* /etc/freeswitch/autoload_configs/

Looking at their script, I see they have some permissions set to root, and some others set to www-data

chown -Rf root.root /var/lib/astpp/
chown -Rf www-data.www-data /var/log/astpp/
chown -Rf root.root /usr/local/astpp/
chown -Rf www-data.www-data /var/www/html/astpp
chown -Rf www-data.www-data /opt/ASTPP/web_interface/astpp
chmod -Rf 755 /var/www/html/astpp

This look correct to you?

And I see here how FreeSwitch is running:

freeswi+ 1641031 1.6 0.2 1046648 23792 ? S<sl 16:57 5:25 /usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat

Thanks for taking the time to respond and explain things.

These are the permissions I run on my own install and every time there are any changes/moves/upgrades or if anything is not working the way it should.

# Owner and Group set to www-data
chown -R www-data. /etc/freeswitch /var/lib/freeswitch \
/var/log/freeswitch /usr/share/freeswitch \
/var/log/astpp /var/log/nginx /opt/ASTPP

# Directory permissions to 755 (u=rwx,g=rx,o='rx')
find /etc/freeswitch -type d -exec chmod 755 {} \;
find /var/lib/freeswitch -type d -exec chmod 755 {} \;
find /var/log/freeswitch -type d -exec chmod 755 {} \;
find /usr/share/freeswitch -type d -exec chmod 755 {} \;
find /opt/ASTPP -type d -exec chmod 755 {} \;
find /var/log/astpp -type d -exec chmod 755 {} \;
find /var/lib/astpp -type d -exec chmod 755 {} \;

# File permissions to 777(u=rwx,g=rwx,o=rwx)
find /var/log/astpp -type f -exec chmod 777 {} \;

# File permissions to 644 (u=rw,g=r,o=r)
find /etc/freeswitch -type f -exec chmod 644 {} \;
find /var/lib/freeswitch -type f -exec chmod 644 {} \;
find /var/log/freeswitch -type f -exec chmod 644 {} \;
find /usr/share/freeswitch -type f -exec chmod 644 {} \;
find /opt/ASTPP -type f -exec chmod 644 {} \;
find /var/lib/astpp -type f -exec chmod 644 {} \;

I ran those, restarted FreeSwitch and getting the same error

Are you using Debian and Apache? Did you restart Freeswitch as a sanity check? Should be straightforward to troubleshoot. I would try set permission to 777 to make sure it’s not an ownership/permissions problem. I would then try copy the files over instead of using a symlink to see if it’s an issue with the symlink.

Still sounds like a permission problem to me. Like maybe you have Freeswitch running as a user other than www-data.

I am using Debian and nginx.

Looking deeper, I see there is no actual symbolic link to /usr/share/freeswitch. That directory actually exists.

ls -l /opt/ASTPP/freeswitch/scripts/
total 12
-rw-r–r-- 1 www-data www-data 566 May 18 20:29 addons.lua
drwxr-xr-x 4 www-data www-data 4096 May 18 20:29 astpp
-rw-r–r-- 1 www-data www-data 3061 May 18 20:29 astpp-callingcards.lua

ls -l /usr/share/freeswitch
total 36
drwxr-xr-x 7 freeswitch freeswitch 4096 May 18 20:36 conf
drwxr-xr-x 2 freeswitch freeswitch 4096 May 18 20:36 fonts
drwxr-xr-x 3 freeswitch freeswitch 4096 May 18 20:37 grammar
drwxr-xr-x 2 freeswitch freeswitch 4096 May 18 20:48 htdocs
drwxr-xr-x 9 freeswitch freeswitch 4096 May 18 20:36 lang
drwxr-xr-x 3 freeswitch freeswitch 4096 May 18 20:49 log
drwxr-xr-x 2 freeswitch freeswitch 4096 May 18 20:37 scripts
drwxr-xr-x 8 freeswitch freeswitch 4096 May 18 20:37 sounds
drwxr-xr-x 2 freeswitch freeswitch 4096 May 18 20:36 tz

And directory /usr/share/freeswitch/scripts/astpp/ does not exist.

They exist on github, so your installation appears to be missing files.

I am not missing any files. I just posted the file contents of what is listed in the directories of the from the command ln -s /opt/ASTPP/freeswitch/scripts/ /usr/share/freeswitch. From that command, it appears the symbolic link failed due to an already existing directory. I am not even sure if it is safe to delete it.

ls -l /opt/ASTPP/freeswitch/scripts/astpp
total 16
-rw-r–r-- 1 www-data www-data 2717 May 18 20:29 astpp.lua
-rw-r–r-- 1 www-data www-data 1678 May 18 20:29 constant.lua
drwxr-xr-x 3 www-data www-data 4096 May 18 20:29 lib
drwxr-xr-x 2 www-data www-data 4096 Jun 14 17:06 scripts

The following could be an issue.
In their v6 install script, they put FS_DIR=/usr/share/freeswitch

It appears a total of four times.

mv -f ${FS_DIR}/scripts /tmp/.
ln -s ${ASTPP_SOURCE_DIR}/freeswitch/scripts ${FS_DIR}

For some reason, I changed it to /usr/local/freeswitch.

I think it had something to do with compiled FreeSwitch being installed there

After correcting those, that error is now gone.

Thanks for helping out, @sman123

Now on to the next error I have to figure out:

switch_odbc.c:375 STATE: 01000 CODE 0 ERROR: [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib/x86_64-linux-gnu/odbc/’ : file not found

That error looks like yet another problem with your install. Assuming you are using MySQL 8 then:

apt install unixodbc unixodbc-dev mysql-connector-odbc

Test odbc driver
odbcinst -s -q

Test odbc connection
isql -v astpp astppuser ${USER_PASSWORD}

You shouldn’t have this and the previous problems if you are installing from scratch using a proper install procedure. I don’t use the official install script but that should work installing from scratch as well.

It almost sounds to me like you are re-installing over old installs. That is about the only way you would have gotten that previous problem with symbolic links trying to overwrite existing directories. You should always re-install from scratch. Starting with a fresh basic install of the OS.

1 Like

Actually it was because I left out the script part which installs the connector included with the ASTPP repo.

Still using MariaDB.

Thanks for taking the time to repond

I do have another question for you.

The logo on the main login page. I am seeking to change the size. From looking, the only page which I could find that includes a logo size in the file is web_interface/astpp/application/views/1.html

All under:

<? if ($this->session->userdata(‘userlevel_logintype’) != ‘0’) {
$user_logo = $this->session->userdata(‘user_logo’);
if ( ! isset($user_logo) && $user_logo == ‘’) {
echo “logo.png”;

                    <a class="navbar-brand" href="<?php echo base_url(); ?>dashboard/">
                    <img id="logo" alt="dashboard" src="<?php echo base_url(); ?>upload/<?= $user_logo?>" width="187" height="71" border="0">
          <? } else {
                    $user_logo = $this->session->userdata('user_logo');
                    if ( ! isset($user_logo) && $user_logo == '') {
                            echo "logo.png";
                    <a class="navbar-brand no-padding margin-t-15" href="<?php echo base_url(); ?>user/user/">
                    <img id="logo" alt="user_logo" src="<?php echo base_url(); ?>upload/<?= $user_logo?>" width="187" height="71" border="0">
            <? }?>


When I change the the values for height and width, the logo size is not changing.

Have some clues on this?

Thanks again.

That is usually done in CSS files. Using google chrome, if you right click on that page and select “inspect” it will bring up the developer tab that will show you what CSS files are currently being used.

ASTPP community edition is really old code. A lot of the html and css stuff is embedded inside the php code. They also do a lot of that “<?php echo…” stuff which is php code being executed inside html. Nobody has written code this way for a long time. As in the last 10 years at least. Now a days, php (backend) code is kept completely separate from html/css/js (front end) code.

If you are using MariaDB that will probably require a different package. Depending on what version of MariaDB you are using and what version of Debian you are using, you may or may not need to install that from source.

If you are using the version of MariaDB included with Debian 11 they do appear to have an installer package for that.

Looking as you suggested I am seeing:

<img class="mb-4 img-fluid" id="logo" alt="login" src="">

On the right, I am presented some .css files:

Went to the files /opt/ASTPP/web_interface/astpp/assets/css/style.css and /opt/ASTPP/web_interface/astpp/assets/css/com-style.css, made some changes and still does not change the logo size.

The drop in ASTPP provides seem to function just fine. I guess I will just kepe using that for now.

Thanks again.

Cancel that @sman123 The image was stuck in cache. The image size did change.

Thanks again!