#!/bin/sh
DBPATH=`grep DB_PATH chan_sip_queue.h | sed -e 's/.*"\(.*\)".*/\1/'`
echo "Database file is $DBPATH. If this is not correct, edit chan_sip_queue.h"
if [ -f $DBPATH ]; then
	echo "Database file exists. If you want to force creation, move it out of the way"
else
	echo "Creating new database..."
	sqlite3 $DBPATH << EOF
CREATE TABLE queue (
	id INTEGER PRIMARY KEY,
	sender TEXT,
	recipient TEXT,
	content_type TEXT,
	body BLOB
);
EOF
fi

