Asterisk Installation

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6 ... 27, 28, 29  Next
Author Message
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Sat Oct 24, 2009 19:54    Post subject: Reply with quote
Ok.....

I did a look up on "asterisk -m" and found that digium has a command that is "asterisk -M".

I went into S90asterisk and changed the -m to a -M; AND changed the -C to a -c

Now based on the output from asterisk -h the -c option enables the CLI. Would this inhibit the web interface of asterisk?

Ran the script and voilá... it executed without any issues.

Now .. to the next step. Is it normal to have these many asterisk processes running?


29285 root 9 0 5696 5696 3600 S 0.0 19.5 0:52.31 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29286 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.01 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29288 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29289 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29290 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29291 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29292 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29293 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29294 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29296 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29300 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29302 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29304 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29305 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf
29306 root 9 0 5696 5696 3600 S 0.0 19.5 0:00.00 /opt/sbin/asterisk -M -c /opt/etc/asterisk/asterisk.conf


AND...

I cannot the asterisk web interface through:

http://my.router.lan.ip/usr/cgi-bin/asterisk

Any suggestions?
Sponsor
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sat Oct 24, 2009 20:50    Post subject: Reply with quote
jjgarciasp wrote:
Ok.....

I did a look up on "asterisk -m" and found that digium has a command that is "asterisk -M".

I went into S90asterisk and changed the -m to a -M; AND changed the -C to a -c

Now based on the output from asterisk -h the -c option enables the CLI. Would this inhibit the web interface of asterisk?

Ran the script and voilá... it executed without any issues.

That startup-script is just a copy of mine which is operational.... (3-landlines and operational 24/7) I am using the asterisk binary in /usr/bin.
I will have a look at it tomorrow morning....
jjgarciasp wrote:

Now .. to the next step. Is it normal to have these many asterisk processes running?

Yes, it's quite normal
jjgarciasp wrote:

AND...

I cannot the asterisk web interface through:

http://my.router.lan.ip/usr/cgi-bin/asterisk

Any suggestions?

Yes, I know...
The cgi-access has been nuked by Brainslayer to limit the possibillities of a potential hacker....

You need to add a ticket to TRAC and ask brainslayer to put it back in. The more people ask for it... (well, I hope... but reality tells me otherwise)

tickets:
http://svn.dd-wrt.com:8000/dd-wrt/ticket/1167
http://svn.dd-wrt.com:8000/dd-wrt/ticket/1182
http://svn.dd-wrt.com:8000/dd-wrt/ticket/1213

code change:
http://svn.dd-wrt.com:8000/dd-wrt/changeset/12532
http://svn.dd-wrt.com:8000/dd-wrt/changeset/12533

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Sun Oct 25, 2009 3:45    Post subject: Reply with quote
Any workaround suggestions?
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 25, 2009 6:31    Post subject: Reply with quote
On a 2nd IP I can run a webserver with virtual hosting so you can access that interface using asterisk.<landomain>

I already took a secondary IP to run pixelserv. Another one could be used to run this webserver...
pixelserv is running in another subnet, but such a webserver should be in the same subnet. If not, it's not possible to make a portforward using the webif.

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Sun Oct 25, 2009 15:32    Post subject: Reply with quote
Ok.. I'm with you.

What do I need to do on the router to create a virtual interface and have that webserver listen on a specific port?
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Oct 27, 2009 23:22    Post subject: Reply with quote
Hi....
The webserver should work now with virtual hosting...

I also found out why your asterisk didn't work...
I'm running asterisk14 which is also on Brainslayer's mega. In my optware I do an "ipkg-opt asterisk" which installs asterisk12.
You could de-install asterisk and install asterisk14....

Code:
ipkg-opt remove asterisk
ipkg-opt install asterisk14

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Wed Oct 28, 2009 1:04    Post subject: Reply with quote
Ok.. will de-install and re-install.

How do I get the virtual host configured?
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Wed Oct 28, 2009 1:10    Post subject: Reply with quote
Ok removed the 1.2 and installed 1.4 ... now what?

How do I get the webif?
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Wed Oct 28, 2009 19:35    Post subject: Reply with quote
jjgarciasp wrote:
Ok.. will de-install and re-install.

How do I get the virtual host configured?


Just place your files (for www.yourdomain.org) in
/opt/share/www/vhosts/org/yourdomain/www

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Wed Oct 28, 2009 19:58    Post subject: Reply with quote
Ok Frater....

You assume I know what "your files is"

Is there an existing directory containing these files..

or is it just the /tmp/www/asterisk/*.* directory?

If that is the case, do I have to change anything else?
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Thu Oct 29, 2009 21:31    Post subject: Reply with quote
Frater...

I am dying over here.... help.. need to get to my router's Asterisk Gui.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Fri Oct 30, 2009 17:58    Post subject: Reply with quote
I've got good news and bad news...
Yes, the asterisk GUI is working...

The bad news is that I just finished the whole virtual hosting setup with lighttpd which is now working, but I still have to find out how to properly set it up so it can use cgi.

It took me 15 minutes to get it working in minihttpd...

The problem is that it seems mini httpd is not that powerful. I don't know really. Maybe it's just because of the simple .conf.
I don't know if I should spent my time getting virtual hosting to work with mini httpd or getting cgi working in lighttpd.... or.... take a nap (I'm tired as hell)

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Fri Oct 30, 2009 20:01    Post subject: Reply with quote
I looked at minihttpd and just now at nostromo.
The latter may be a good candidate too although I already need an upgrade to 1.92 because that's the 1st version to support single interfaces...
The asterisk cgi script is working there as well...

I still don't know if I can do virtual hosting as easy as apache or lighttpd.

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sat Oct 31, 2009 0:25    Post subject: Reply with quote
I finally decided to use the httpd of busybox for the the asterisk-GUI. It already has a small footprint and can run in xinetd mode. It will not use memory if not used and only xinetd will listen....

You should be able to access it using:

http://asterisk.:1313/cgi-bin/asterisk

Code:
wget -qO S90asterisk http://wd.mirmana.com/S90asterisk
mkdir -p /opt/etc/asterisk 2>/dev/null
wget -qO /opt/etc/asterisk/asterisk.sh http://wd.mirmana.com/asterisk.sh
chmod +x /opt/etc/asterisk/asterisk.sh
wget -qO /opt/etc/init.d/S10xinetd        http://wd.mirmana.com/S10xinetd
wget -qO /opt/usr/sbin/service         http://wd.mirmana.com/service
service xinetd restart
service asterisk restart
service xinetd

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
jjgarciasp
DD-WRT User


Joined: 18 Jun 2006
Posts: 210
Location: Central Florida

PostPosted: Sat Oct 31, 2009 7:27    Post subject: Reply with quote
You are the man... Thank you Frater for all your work.

I had turned off pound so I turned it back on and followed your script.

Now on to configuring the actual PBX because when I enter this: http://my.router.ip:1313/cgi-bin/asterisk.

I get this.



my.asterisk.webif.png
 Description:
 Filesize:  13.2 KB
 Viewed:  55881 Time(s)

my.asterisk.webif.png


Goto page Previous  1, 2, 3, 4, 5, 6 ... 27, 28, 29  Next Display posts from previous:    Page 5 of 29
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum