Problems getting 0.8 running on Debian Lenny
Forum » WikiPBX / Technical Support » Problems getting 0.8 running on Debian Lenny
Started by: chigambamukokochigambamukoko
On: 1278882219|%e %b %Y, %H:%M %Z|agohover
Number of posts: 13
rss icon RSS: New posts
Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1278882219|%e %b %Y, %H:%M %Z|agohover

My system is a Debian Lenny, VPS (virtuozzo). I have followed the steps to install 0.8 on a Debian system. I can't seem to make it work even though I have tried by starting with a clean server and install everything from scratch a few times.

I noticed a folder called "templates" inside of wikipbx-0.8/wikipbx/wikipbxsweb.
1)which steps when installing wikipbx does the files inside this templates folder get copied to maybe a /var/www/ folder? Or I have to do that manually? I am finding that after I followed all the steps, when I go to my wikipbx.myserver.net, I'm still loading the default "It works".
However for just the heck of it, I copied all the files from this templates folder into a /var/www/xml_dialplan and when I go to wikipbx.myserver.net, something does come up, its just that there are errors, which leads me to believe that there is a step I am missing or I am doing wrong.

2)In this file:
/usr/local/freeswitch/conf/xml_curl.conf.xml,
I see this line:
<param name="gateway-url" value="http://wikipbx.yourserver.net/xml_dialplan/" bindings="configuration,dialplan,directory"/>
do I create this "xml_dialplan" manually or it should be created on one of the steps when setting up wikipbx?

This is probably quite easy for you guys, but I have tried different novice tricks that I know with no luck, any and all help is sincirely appreciated.

Reply  |  Options
Unfold Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1278882219|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
stas_shtinstas_shtin 1278927744|%e %b %Y, %H:%M %Z|agohover

You're asking questions about static files, but wikipbx returns dynamic output to the web server through mod_wsgi. Make sure you have it configured.

As for your questions:

1. You don't need to copy anything to /var/www dir. The "templates" directory is used by wikipbx internally, it's not meant to be displayed by the web server directly.

2. You don't need to create that file. Once you have mod_wsgi and wikipbx configured, freeswitch would be receiving necessary configs from that URL.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by stas_shtinstas_shtin, 1278927744|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1278974017|%e %b %Y, %H:%M %Z|agohover

Thank you for the reply, I noticed a segmentation error in the apache error log, so I went back and used dpkg and apt-get -purge and removed the conflicting packages, among them was python-base. I then built python 2.5.5 from scratch. I have not seen the segmentation error since then, however, I'm now getting "File does not exist: /var/www/xml_dialplan" in the apache error log. Is there an obvious file that I may have misconfigured that could be causing this error? Maybe some direction on where to go next?

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1278974017|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
stas_shtinstas_shtin 1279001598|%e %b %Y, %H:%M %Z|agohover

Next step is to build, install and configure mod_wsgi. Once you have it running, apache will be getting pages from wikipbx instead of static files in /var/www directory.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by stas_shtinstas_shtin, 1279001598|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1279161993|%e %b %Y, %H:%M %Z|agohover

Ok, folks, still no go for me, not sure where I'm messing up but I have gone through over and over, I'm sure I'm missing something simple, I need help. Rebuild python, rebuild wsgi and followed the instruction again to make sure I redid everything but no luck. One of the errors I keep getting when loading Freeswitch is :

[ERR] mod_xml_curl.c:304 Received HTTP error 404 trying to fetch http://wikipbx.myserver.net/xml_dialplan data: [hostname=wikipbx.myserver.net&section=configuration&tag_name=configuration&key_name=name&key_value=post_load_switch.conf]

I don't seem to be getting any errors when loading apache. Any more pointers would be appreciated. I have scoured the net for similar issues but non seems to apply to my situation. Help por favor!

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1279161993|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
stas_shtinstas_shtin 1279185187|%e %b %Y, %H:%M %Z|agohover

What happens when you open http://wikipbx.myserver.net in the browser? Are there any errors on the page or in apache error log?

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by stas_shtinstas_shtin, 1279185187|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1279246775|%e %b %Y, %H:%M %Z|agohover

I get "It works!", which is a standard default page for Debian Apache I think. As far as apache errors I have not seen any errors. The only time I see errors is when starting Freeswitch.

Here are my configuration files, the only parts not real are "myserver" and "PASSWORD" :

/usr/local/freeswitch/conf/autoload_configs/xml_curl.conf.xml ,

/etc/apache2/sites-available/wikipbx

???????????????????????????????????????????????????????????????????????????

<configuration name="xml_curl.conf" description="cURL XML Gateway">
<bindings>
<binding name="example">
<!— The url to a gateway cgi that can generate xml similar to
what's in this file only on-the-fly (leave it commented if you dont
need it) >
<!
one or more |-delim of configuration|directory|dialplan >
<param name="gateway-url" value="http://wikipbx.myserver.net/xml_dialplan" bindings="configuration,dialplan,directory"/>
<!
set this to provide authentication credentials to the server >
<!
<param name="gateway-credentials" value="muser:mypass"/>>
<!
<param name="auth-scheme" value="basic"/>—>

<!— optional: this will enable the CA root certificate check by libcurl to
verify that the certificate was issued by a major Certificate Authority.
note: default value is disabled. only enable if you want this! >
<!
<param name="enable-cacert-check" value="true"/>>
<!
optional: verify that the server is actually the one listed in the cert >
<!
<param name="enable-ssl-verifyhost" value="true"/> —>

<!— optional: these options can be used to specify custom SSL certificates
to use for HTTPS communications. Either use both options or neither.
Specify your public key with 'ssl-cert-path' and the private key with
'ssl-key-path'. If your private key has a password, specify it with
'ssl-key-password'. >
<!
<param name="ssl-cert-path" value="$${base_dir}/conf/certs/public_key.pem"/> >
<!
<param name="ssl-key-path" value="$${base_dir}/conf/certs/private_key.pem"/> >
<!
<param name="ssl-key-password" value="MyPrivateKeyPassword"/> >
<!
optional timeout >
<!
<param name="timeout" value="10"/> —>

<!— optional: use a custom CA certificate in PEM format to verify the peer
with. This is useful if you are acting as your own certificate authority.
note: only makes sense if used in combination with "enable-cacert-check." >
<!
<param name="ssl-cacert-file" value="$${base_dir}/conf/certs/cacert.pem"/> —>

<!— optional: specify the SSL version to force HTTPS to use. Valid options are
"SSLv3" and "TLSv1". Otherwise libcurl will auto-negotiate the version. >
<!
<param name="ssl-version" value="TLSv1"/> —>

<!— optional: enables cookies and stores them in the specified file. >
<!
<param name="cookie-file" value="/tmp/cookie-mod_xml_curl.txt"/> —>

<!— one or more of these imply you want to pick the exact variables that are transmitted >
<!
<param name="enable-post-var" value="Unique-ID"/>—>
</binding>
</bindings>
</configuration>

**
WSGIPythonPath /usr/src/wikipbx-0.8:/usr/src/django:/usr/src/freeswitch/libs/esl/python

<VirtualHost *:80>
ServerAdmin ten.revresym.xbpikiw|retsambew#ten.revresym.xbpikiw|retsambew
WSGIScriptAlias / /usr/src/wikipbx-0.8/wikipbx.wsgi
ServerName wikipbx.myserver.net
ErrorLog /var/log/apache2/wikipbx.myserver.net-error.log
CustomLog /var/log/apache2/wikipbx.myserver.net.log common
</VirtualHost>
**
INSTRUCTIONS

  1. 1. Change DATABASE_USER
  2. 2. Change DATABASE_PASSWORD
  3. 3. Customize FREESWITCH_URL_PORT

import os

  1. settings.py lives in the wikipbx subdir, eg, the "source" directory
  2. (/usr/src/wikipbx/wikipbx)

INSTALL_SRC = os.path.dirname(file)

  1. the parent of the source directory is the installation root, eg, the
  2. dir the user checked out to (eg, /usr/src/wikipbx)

INSTALL_ROOT = os.path.split(INSTALL_SRC)[0]

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Your Name', 'moc.niamod|liame_ruoy#moc.niamod|liame_ruoy'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'wikipbx' # Or path to database file if using sqlite3.
DATABASE_USER = 'wikipbxuser' # Not used with sqlite3.
DATABASE_PASSWORD = 'PASSWORD' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.

  1. Local time zone for this installation. Choices can be found here:
  2. http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
  3. although not all variations may be possible on all operating systems.
  4. If running in a Windows environment this must be set to the same as your
  5. system time zone.

TIME_ZONE = 'UTC'

  1. Language code for this installation. All choices can be found here:
  2. http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
  3. http://blogs.law.harvard.edu/tech/stories/storyReader$15

LANGUAGE_CODE = 'en-us'

SITE_ID = 1

  1. If you set this to False, Django will make some optimizations so as not
  2. to load the internationalization machinery.

USE_I18N = True

  1. Absolute path to the directory that holds media.
  2. Example: "/home/media/media.lawrence.com/"
  1. Example: "http://media.lawrence.com"

MEDIA_URL = ''

  1. URL prefix for admin media — CSS, JavaScript and images. Make sure to use a
  2. trailing slash.
  3. Examples: "http://foo.com/media/", "/media/".

ADMIN_MEDIA_PREFIX = '/media/'

  1. Make this unique, and don't share it with anybody.

SECRET_KEY = '_#5%!uu1rgn9qu80ewht&8y96lqu2_r9s09*g(94$smx#xc*!o'

  1. List of callables that know how to import templates from various sources.

TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',

  1. 'django.template.loaders.eggs.load_template_source',

)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
)

ROOT_URLCONF = 'wikipbx.urls'

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(INSTALL_SRC, "/usr/src/wikipbx-0.8/wikipbx/wikipbxweb/templates"),
os.path.join(INSTALL_SRC, "/usr/src/wikipbx-0.8/wikipbx/freeswitchxml"),
)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'wikipbx.wikipbxweb',
)

TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth',
'wikipbx.wikipbxweb.context_processors.global_processor',
)

AUTH_PROFILE_MODULE = 'wikipbxweb.UserProfile'

STATIC_TTS_ENGINE = "cepstral"

  1. you must manually create directories and subdirectories, eg:
  2. mkdir -p /var/log/wikipbx/cdr/err
  3. and set permissions according to user freeswitch process will run under

LOG_DIR_ROOT = "/var/log/wikipbx"
CDR_LOG_DIR = os.path.join(LOG_DIR_ROOT, "cdr")
CDR_ERR_LOG_DIR = os.path.join(LOG_DIR_ROOT, "cdr", "err")

  1. should the entire raw cdr xml be saved in the db? (uses lots of db
  2. space but useful when the extracted fields aren't enough information)

CDR_SAVE_XML = False

  1. the url (including port if non-default) where freeswitch can contact
  2. the wikipbx server for things like posting XML_CDR records.
  3. this value completely depends on how you have your webserver
  4. setup. Can be ip or hostname, depends on webserver

FREESWITCH_URL_PORT = "http://wikipbx.myserver.net"
???????????????????????????????????????????????????????????????????????????

When I type :echo $PYTHONPATH

here is what I get back
:/usr/src/wikipbx-0.8:/usr/src/freeswitch/scripts/python:/usr/local/lib/python2.5/site-packages
wikipbx:/usr/src/wikipbx-0.8/wikipbx#

I'm hoping someone might see an obvious error somewhere in the config files.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1279246775|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
stas_shtinstas_shtin 1279268183|%e %b %Y, %H:%M %Z|agohover

1. Do you have a symlink to /etc/apache2/sites-available/wikipbx in your /etc/apache2/sites-enabled directory?

2. Add these lines to the end of VirtualHost section in /etc/apache2/sites-available/wikipbx:

        <Directory /usr/src/wikipbx-0.8>
                Order allow,deny
                Allow from all
        </Directory>

Restart apache.

3. Are there any errors displayed when apache is started?

Unfold Re: Problems getting 0.8 running on Debian Lenny by stas_shtinstas_shtin, 1279268183|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1279278065|%e %b %Y, %H:%M %Z|agohover

thanks for the help again,

1)yes I have,

wikipbx:/etc/apache2/sites-enabled# ls -al
total 2
drwxr-xr-x 2 root root 1024 Jul 11 13:21 .
drwxr-xr-x 7 root root 1024 Jul 11 02:31 ..
lrwxrwxrwx 1 root root 36 Dec 20 2009 000-default -> /etc/apache2/sites-available/default
lrwxrwxrwx 1 root root 26 Jul 11 13:21 wikipbx -> ../sites-available/wikipbx
wikipbx:/etc/apache2/sites-enabled#
*

2)Done that and restarted and
***
3)No errors in Apache, see the tail log below

[Thu Jul 15 21:56:40 2010] [error] [client 61.178.187.181] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Jul 16 05:42:22 2010] [error] [client 74.63.218.250] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Jul 16 06:00:16 2010] [notice] caught SIGTERM, shutting down
[Fri Jul 16 06:00:17 2010] [notice] Apache/2.2.9 (Debian) mod_wsgi/3.1 Python/2.5.2 configured — resuming normal operations
[Fri Jul 16 06:02:01 2010] [error] [client 127.0.0.1] File does not exist: /var/www/xml_dialplan
[Fri Jul 16 06:02:01 2010] [error] [client 127.0.0.1] File does not exist: /var/www/xml_dialplan
[Fri Jul 16 06:02:01 2010] [error] [client 127.0.0.1] File does not exist: /var/www/xml_dialplan

-The last 3 lines happens when I actually load Freeswitch, not when restarting apache
-Also I actually compiled Python 2.5.5 but its shown here as 2.5.2, don't know if that makes a difference at all

Last edited on 1279278276|%e %b %Y, %H:%M %Z|agohover By chigambamukoko + Show more
Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1279278065|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1279369748|%e %b %Y, %H:%M %Z|agohover

any more clues? anyone?

Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1279369748|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1279464617|%e %b %Y, %H:%M %Z|agohover

thanks for you help there stas_shtin, I got it to work, I was mixing up the virtual domains. Now I got a new problem, some of the links never load, there is a description of the problem and solution here:

http://wikipbx.wikidot.com/forum/t-233617/problems-getting-0-8-running-on-debian

but because I am new to all this, I get all kinds of errors maybe someone could shed some light on how to implement the solution correctly. Here is what I have done so far:

1)Downloaded Swig and unzipped into /usr/src/swig-2.0.0
2)Ran ./configure ( I am not sure what options if any I should put when running configure, I just ran without any)
3)When I try to run "make install" I get:

/usr/src/swig-2.0.0/Tools/config/install-sh: swig does not exist.
make: *** [install-main] Error 1

4)So I went to /usr/src/freeswitch/src/mod/languages/mod_python and tried to run "make reswig" here is what I got:
wikipbx:/usr/src/freeswitch/src/mod/languages/mod_python# make reswig
rm -f mod_python_wrap.* freeswitch.py
which swig 2>&1 »/dev/null && swig -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i
make: *** [mod_python_wrap.cpp] Error 1

I'm sure I missed a step or a few steps, but any and all help is greatly appreciated.

thanks a lot

Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1279464617|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
chigambamukokochigambamukoko 1279477252|%e %b %Y, %H:%M %Z|agohover

sorry for taking your time, I got it all figured out now, thanks again

Unfold Re: Problems getting 0.8 running on Debian Lenny by chigambamukokochigambamukoko, 1279477252|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian Lenny
stas_shtinstas_shtin 1279538671|%e %b %Y, %H:%M %Z|agohover

Sorry, I've been away from the net for last few days. Congratulations on having everything configured & build, hopefully using wikipbx would give you way more smoother experience than setting up its dependencies :-)

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian Lenny by stas_shtinstas_shtin, 1279538671|%e %b %Y, %H:%M %Z|agohover
New Post
page_revision: 0, last_edited: 1226259295|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License