Asterisk Installation

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


Joined: 23 Apr 2009
Posts: 14

PostPosted: Mon May 04, 2009 16:00    Post subject: Reply with quote
frater wrote:


BTW... Do you know how to limit a client to only local extensions and don't use the 2 outgoing providers I made?


The answer is contexts. Create a context "internal" that has only internal extensions. And then include this context to the contexts where you want extensions to be able to dial internal extensions. e.g.

[internal]
exten => 401,1,Ringing
exten => 401,2,Dial(SIP/xlite1,20,T)
exten => 401,3,Voicemail(u3401)
exten => 401,4,Hangup

exten => 402,1,Ringing
exten => 402,2,Dial(SIP/xlite2,20,T)
exten => 402,3,Voicemail(u402)
exten => 402,4,Hangup

[internal-external]
include => internal
exten => _1XXXXXXXXXX,1,Dial(<use your application here in my case it is spa3102 pstn line as you can see on the next line>)
exten => _1800XXXXXXX,1,Dial(SIP/${EXTEN}@pstn-spa3k,60,)
exten => _1800XXXXXXX,2,Congestion

Now to restrict extensions in your sip.conf define context=internal or external as you like.

How did you make the calls from WAN side work. My calls are going through but after around a minute the voice stops passing through. Could you please share your settings???
Sponsor
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Mon May 04, 2009 16:42    Post subject: Reply with quote
Be aware that I just recently (2 weeks ago) decided to run asterisk on my DD-WRT


firewall script:
Code:
iptables -I INPUT 1 -p udp --dport 5060 -j ACCEPT
iptables -I INPUT 1 -p udp --dport 12000:13000 -j ACCEPT
/opt/etc/init.d/S90asterisk restart


nat=no (as global config)

Every client extension that roams connect to the WAN-interface and "nat=yes"

Everything for the time being on "canreinvite=no", but when I'm more sure about my config this will change to "canreinvite=nonat"

Do enable srvlookup=yes but first check if your SIP-provider supports it

cat /opt/etc/asterisk/sip.conf
Code:
[general]
nat=no
externip=84.291.0.141
localnet=192.168.10.0/24
useragent=DD-WRT
context=default                 ; Default context for incoming calls
;allowguest=no                  ; Allow or reject guest calls (default is yes)
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
;allowtransfer=no               ; Disable all transfers (unless enabled in peers or users)
                                ; Default is enabled
realm=mydomain.com               ; Realm for digest authentication
                                ; defaults to "asterisk". If you set a system name in
                                ; asterisk.conf, it defaults to that system name
                                ; Realms MUST be globally unique according to RFC 3261
                                ; Set this to your host name or domain name
bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
                                ; bindport is the local UDP port that Asterisk will listen on
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
                                ; Note: Asterisk only uses the first host
                                ; in SRV records
                                ; Disabling DNS SRV lookups disables the
                                ; ability to place SIP calls based on domain
                                ; names to some other SIP users on the Internet

;pedantic=yes                   ; Enable checking of tags in headers,
                                ; international character conversions in URIs
                                ; and multiline formatted headers for strict
                                ; SIP compatibility (defaults to "no")
disallow=all                    ; First disallow all codecs
allow=alaw                      ; Allow codecs in order of preference
allow=ulaw
allow=g726
allow=gsm
;sipdebug = yes                  ; Turn on SIP debugging by default, from
                                ; the moment the channel loads this configuration

register =>31495714055:password@budgetphone.nl
register =>31494712344:password@sipsrv.sipnl.net

[budgetphone]
type=friend
context=from-budgetphone
host=sip.budgetphone.nl
fromuser=31495714055
fromdomain=budgetphone.nl
username=31495714055
insecure=port,invite
canreinvite=nonat
secret=password
qualify=yes
port=5060
dtmfmode=rfc2833
disallow=all                   ; First disallow all codecs
allow=alaw                     ; Allow codecs in order of preference
allow=ulaw

[gakijken]
type=friend
context=from-gakijken
host=sip.gakijken.nl
fromuser=31494712344
fromdomain=sip.gakijken.nl
username=31494712344
insecure=port,invite
canreinvite=nonat
directrtpsetup=yes
secret=password
qualify=yes
port=5060
dtmfmode=rfc2833

[201]
host=dynamic
qualify=yes
defaultuser=201
secret=pass201
type=friend
canreinvite=no

[222]
host=dynamic
qualify=yes
defaultuser=222
secret=pass222
type=friend
canreinvite=no
nat=yes

[322]
host=dynamic
qualify=yes
defaultuser=322
secret=pass322
type=friend
nat=yes
canreinvite=no

[800]
host=dynamic
qualify=yes
defaultuser=800
secret=pass800
type=friend
nat=yes
canreinvite=no



cat /opt/etc/asterisk/extensions.conf
Code:
[default]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

include => internal
include => from-budgetphone
include => from-gakijken
include => dialrules

[generals]
[globals]
jp=SIP/800&SIP/201&SIP/222&SIP/322

[extensions]
exten => _XX,1,Dial(SIP/${EXTEN},13)
exten => _XX,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy,unavail)
exten => _XX,n(unavail),VoiceMail(10@default,u)
exten => _XX,n,Hangup()
exten => _XX,n(busy),VoiceMail(10@default,u)
exten => _XX,n,Hangup()
exten => 900,1,VoiceMailMain()

[internal]
;lijst van interne doorschakelingen. Na 20 seconden niet opgenomen gesprek gecancelled
exten => 800,1,Dial(SIP/800,20)
exten => 201,1,Dial(SIP/201,20)
exten => 222,1,Dial(SIP/222,20)
exten => 322,1,Dial(SIP/322,20)

[dialrules]
include => extensions
exten => _X.,1,Dial(SIP/budgetphone/${EXTEN},60,tr)
exten => _+.,1,Dial(SIP/budgetphone/00${EXTEN:1},60,tr)
exten => _9.,1,Dial(SIP/gakijken/${EXTEN:1},60,tr)
exten => _9+.,1,Dial(SIP/gakijken/00${EXTEN:2},60,tr)

[from-budgetphone]
include => extensions
exten => s,1,Dial(${jp},20)

[from-gakijken]
include => extensions
exten => s,1,Dial(${jp},20)


cat /opt/etc/asterisk/modules.conf
Code:
[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger has been initialized) can be loaded
; using 'preload'. This will frequently be needed if you wish to map all
; module configuration files into Realtime storage, since the Realtime
; driver will need to be loaded before the modules using those configuration
; files are initialized.
;
; An example of loading ODBC support would be:
;preload => res_odbc.so
;preload => res_config_odbc.so
;
; Uncomment the following if you wish to use the Speech Recognition API
;preload => res_speech.so
;
; Do not load several modules
;
noload => pbx_ael.so
noload => pbx_dundi.so
noload => chan_iax2.so
;
; Intercom application is obsoleted by
; chan_oss. Don't load it.
;
noload => app_intercom.so
;
; Explicitly load the chan_modem.so early on to be sure
; it loads before any of the chan_modem* 's afte rit
;
; load => chan_modem.so
noload => res_musiconhold.so
noload => chan_modem.so

noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so

noload => chan_mgcp.so
noload => chan_skinny.so

; require for voicemail
load => res_adsi.so

noload => app_festival.so
noload => app_url.so
noload => app_image.so
noload => app_disa.so
noload => app_qcall.so
noload => app_adsiprog.so

noload => app_ices.so

;noload => codec_g726.so
;noload => codec_alaw.so
noload => format_vox.so

noload => format_h263.so
noload => format_jpeg.so

;noload => cdr_csv.so
;noload => cdr_manager.so

noload => app_zapras.so
noload => app_flash.so
noload => app_zapbarge.so
noload => app_zapscan.so
noload => app_talkdetect.so
noload => app_alarmreceiver.so


;
; If you want, load the GTK console right away.
;
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
;
load => res_musiconhold.so
;
; Load either OSS or ALSA, not both
; By default, load OSS only (automatically) and do not load ALSA
;
noload => chan_alsa.so
;noload => chan_oss.so

noload => func_odbc.so

noload => chan_alsa.so
noload => chan_gtalk.so
noload => chan_oss.so

noload => codec_ilbc.so
noload => codec_lpc10.so
noload => codec_speex.so

noload => format_ogg_vorbis.so

noload => res_config_odbc.so
noload => res_jabber.so
noload => res_odbc.so
noload => res_snmp.so
noload => res_smdi.so

noload => cdr_odbc.so
noload => cdr_radius.so
noload => cdr_sqlite.so
noload => cdr_pgsql.so
noload => cdr_mysql.so
noload => cdr_tds.so

[global]
chan_modem.so=no

_________________
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)
newboy
DD-WRT Novice


Joined: 18 Sep 2008
Posts: 42

PostPosted: Mon May 18, 2009 15:34    Post subject: Reply with quote
Hi,

Would somebody have a tutorial on how to install and run Asterisk on a MMC. I have installed about half a dozen times but when I reboot the router, asterisk will not start.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Mon May 18, 2009 16:19    Post subject: Reply with quote
I've given all the info to do that in this thread..
Please study harder...

If you know how to do it and can pinpoint where things were not explained properly, you should write a tutorial for others in this forum or the wiki.

_________________
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)
newboy
DD-WRT Novice


Joined: 18 Sep 2008
Posts: 42

PostPosted: Tue May 19, 2009 11:50    Post subject: Reply with quote
frater wrote:
I've given all the info to do that in this thread..
Please study harder...


I have read through this thread so many times, and still cannot find the answer, how to install to a MMC

frater wrote:

If you know how to do it and can pinpoint where things were not explained properly, you should write a tutorial for others in this forum or the wiki.


I wish I have it working so I could write up a tutorial, I would certainly do so when I have completed my install, so please give a newbie a chance.

Here is what I have done so far.

Router Linksys WRT54GL V1.1

1. Done the mod for an MMC and enabled via the gui.
2.
Code:
cd /mmc
mkdir opt
mount -o bind /mmc/opt /opt
cd
wget http://www.wlan-sat.com/boleo/optware optware-install-ddwrt.sh  -O - | tr -d '\r' > /tmp/optware-install.sh

Connecting to www.wlan-sat.com (91.185.198.146:80)
Code:
sh /tmp/optware-install.sh

3. This is the result of the above command
Checking system config ...
Using 150.101.212.32 as default gateway.
Using the following nameserver(s):
nameserver 192.168.1.1
Installing package uclibc-opt_0.9.28-13_mipsel.ipk ...
Connecting to ipkg.nslu2-linux.org (140.211.169.169:80)
Updating /opt/etc/ld.so.cache
Installing package ipkg-opt_0.99.163-10_mipsel.ipk ...
Connecting to ipkg.nslu2-linux.org (140.211.169.169:80)
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/optware
Successfully terminated.
Installing uclibc-opt (0.9.28-13) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk
package uclibc-opt suggests installing ipkg-opt
Configuring uclibc-opt
Updating /opt/etc/ld.so.cache
Successfully terminated.
Installing ipkg-opt (0.99.163-10) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk
Configuring ipkg-opt
Successfully terminated.
4.
Code:
ipkg-opt install asterisk14

5.This is the result of the above
Installing asterisk (1.4.22.1-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/asterisk_1.4.22.1-1_mipsel.ipk
Installing openssl (0.9.7m-5) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/openssl_0.9.7m-5_mipsel.ipk
Installing ncurses (5.7-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ncurses_5.7-1_mipsel.ipk
Installing libcurl (7.19.4-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/libcurl_7.19.4-1_mipsel.ipk
Installing zlib (1.2.3-3) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/zlib_1.2.3-3_mipsel.ipk
Configuring asterisk
Configuring libcurl
Configuring ncurses
update-alternatives: Linking //opt/bin/clear to /opt/bin/ncurses-clear
Configuring openssl
Configuring zlib
Successfully terminated.
6.
When I issue asterisk -r this is what I get.
Unable to connect to remote asterisk (does /opt/var/run/asterisk.ctl exist?)
7.
So I just type asterisk at ROOT
This is what I get then.
Code:
asterisk -r


Asterisk 1.2.24, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'show license' for details.
=========================================================================
Connected to Asterisk 1.2.24 currently running on Asterisk-DD-WRT (pid = 8036)
Asterisk-DD-WRT*CLI>

8.
Now here is where my problem is.

a. For some strange reason I cannot create the file called "S90asterisk" in /opt/etc/init.d" it just wont let me do this.
b. When I reboot the router all the files in the "OPT" dir is lost.
c. But strange enough "mmc/opt" has all the folders & files that were on "OPT" it basically creates a duplicate set, but I just cannot get "asterisk" to run.

Appriciate any help and advice what I should be doing or where I stuffed up.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu May 21, 2009 16:01    Post subject: Reply with quote
You should first get your optware issues sorted...
I have no experience with MMC because I simply use an USB memory stick.

_________________
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)
newboy
DD-WRT Novice


Joined: 18 Sep 2008
Posts: 42

PostPosted: Sat May 23, 2009 11:52    Post subject: Reply with quote
frater wrote:
You should first get your optware issues sorted...


I thought I had it installed ok as it downloads and install asterisk perfect.

frater wrote:

I have no experience with MMC because I simply use an USB memory stick.


Would you mind sharing a bit more info on how you have done this and the steps you used to install asterisk on your USB.

Thanks a lot for the info you have posted it is the most comprehensive detailed info I have come accross to date.
+1 for frater
rikisphinx
DD-WRT Novice


Joined: 22 Jun 2009
Posts: 11

PostPosted: Mon Jun 29, 2009 10:59    Post subject: installation of asterisk on wrt350n with usb flash drive... Reply with quote
Hi all,
I am having some trouble with my installation, hope you can help me sort it out. I am using a WRT350n and i have a usb stick of 2 gigs formatted in 4 partitions of 465 Meg. I think that my problems is with the mounted drives. I used the web gui of dd-wrt to automount the /opt drive and i enabled the JFFS2 options. I installed succesfully asterisk and some dependencies as Robertut stated but when i tried to install the asterisk management GUI, i can't get it to work and everytime i reboot the rooter, i lost all my preconfigured folders and i get my /opt folder back with only one folder : the lost+found folder. I really think that i have a problem with the folders i mounted. Maybe with your expertise you already see where i made a mistake but if you don't, here comes a few questions:

1- In the GUI i put /opt as the default folder to auto-mount is that correct? should i also use a startup script? if yes do you have one?

2- When i enable JFFS2, it shows that i only have 128 kb of total memory and 0 free. Is that normal? How can i expand that memory permanently?

3- Should i have some kind of link between the /JFFS folder and the /opt folder? Should one be inside the other?

4- Do i need to mount /jffs , /opt, /mnt and /mmc in each partitions or is there a way to include all in one folder under /opt?

5- Since every time i reboot the rooter i lost all my config files and folders even in the /opt folder auto-mounted, what can i do to have them permanently on my usb drive? Is there a way to mount them permanently?

6- i can never download the asterisk.php file to the designated folder every time, i have to put it first in my computer and transfer it from my computer to the wrt350n. But even when i do so , i can't make the management gui work it asks me for a password and then i don't get anything, the browser says that the page cannot display...

7- if i have that line:
" mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt " can i mount multiple folders pointing to /opt like: mount /jffs /opt and mount /mnt/tmp /opt all at the same time? if yes how can i make it persistent to survive a reboot?

8- Should i put and use a swap in the usb drive?

This is where i have some difficulties, since i am a windows user i am not really used with mounting partitions and i guess that is where i am struggling. but if you see some other things i am doing wrong please point out.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Mon Jun 29, 2009 16:36    Post subject: Re: installation of asterisk on wrt350n with usb flash drive Reply with quote
rikisphinx wrote:

1- In the GUI i put /opt as the default folder to auto-mount is that correct? should i also use a startup script? if yes do you have one?

Yes...
I placed this in my startup.
This will start all S* scripts in /opt/etc/init.d
Code:
echo -e "#!/bin/sh\nn=1\nwhile sleep 3\ndo\n\t[ -d /opt/etc/init.d ] && break\n\t[ \$n -gt 120 ] && break\n\tlet n+=1\ndone" >/tmp/S90optware
echo -e "\nfor f in /opt/etc/init.d/S* ; do\n\t[ -x \$f ] && \$f start\ndone" >>/tmp/S90optware
chmod +x /tmp/S90optware
/tmp/S90optware &

In /opt/etc/init.d I have this S90asterisk
wget http://wd.mirmana.com/S90asterisk

In /opt/etc/asterisk I added this management script which I slightly modified....
http://wd.mirmana.com/asterisk.sh
rikisphinx wrote:

2- When i enable JFFS2, it shows that i only have 128 kb of total memory and 0 free. Is that normal? How can i expand that memory permanently?

You don't need jffs at all if you have a USB-stick.
rikisphinx wrote:

3- Should i have some kind of link between the /JFFS folder and the /opt folder? Should one be inside the other?

See 2
rikisphinx wrote:

4- Do i need to mount /jffs , /opt, /mnt and /mmc in each partitions or is there a way to include all in one folder under /opt?

Just mount /opt and create a structure as if it's root... You should at least have:
/opt/bin
/opt/sbin
/opt/etc/init.d
/opt/etc/asterisk
/opt/var/run
/opt/var/log/asterisk
/opt/var/lib/asterisk
But most are already there if you used "ipkg-opt" to install asterisk...
BTW... You ARE using ipkg-opt and not ipkg?
rikisphinx wrote:

5- Since every time i reboot the rooter i lost all my config files and folders even in the /opt folder auto-mounted, what can i do to have them permanently on my usb drive? Is there a way to mount them permanently?

Yes, you can use the standard DD-WRT GUI to mount one of your ext2/ext3 partition as /opt
Use that!
rikisphinx wrote:

6- i can never download the asterisk.php file to the designated folder every time, i have to put it first in my computer and transfer it from my computer to the wrt350n. But even when i do so , i can't make the management gui work it asks me for a password and then i don't get anything, the browser says that the page cannot display...

asterisk.php is not part of asterisk and you need a php-webserver for that...
I think you can do enough with the asterisk.sh
You can use http://192.168.10.1/user/cgi-bin/asterisk
to manage asterisk (192.168.10.1 is the IP of my router)
rikisphinx wrote:

7- if i have that line:
" mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt " can i mount multiple folders pointing to /opt like: mount /jffs /opt and mount /mnt/tmp /opt all at the same time? if yes how can i make it persistent to survive a reboot?

Question #5
rikisphinx wrote:

8- Should i put and use a swap in the usb drive?

Never use swap on a flash-drive.
I have enabled it on my friend's DD-WRT but I'm still not sure if it's really used...
Please use a seperate thread (if you have a harddisk instead of flash memory)
rikisphinx wrote:

This is where i have some difficulties, since i am a windows user i am not really used with mounting partitions and i guess that is where i am struggling. but if you see some other things i am doing wrong please point out.

No problem...
Let me know how far this will get you...

_________________
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)
rikisphinx
DD-WRT Novice


Joined: 22 Jun 2009
Posts: 11

PostPosted: Tue Jun 30, 2009 4:59    Post subject: Now Problems with *.sh files Reply with quote
Frater,
Thank you so much for your help i have now all my files installed and i only have a problem at the management GUI! I can't ever make the download of the asterisk.sh file. I mean in the putty, it just shows me that it connects to the site and bring back the console but the file never get there. I tried your file also and i couldn't get it. for the FIVN site, i downloaded it to my computer and copied it to the box but when i try to open the url, it just ask me if i want to save the file or open it... I think that i can't open any *.sh file. Any suggestions?
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Jun 30, 2009 5:36    Post subject: Reply with quote
Quote:
I can't ever make the download of the asterisk.sh file.

That was not your fault....
I didn't put it in the right place to be downloaded....
Just try again...
Sorry..
Code:
cd /opt/etc/asterisk
wget -O asterisk.sh http://wd.mirmana.com/asterisk.sh
chmod +x asterisk.sh


BTW if you install "tac" you can view your log in reverse order....

Code:
ipkg-opt install tac

_________________
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)
rikisphinx
DD-WRT Novice


Joined: 22 Jun 2009
Posts: 11

PostPosted: Tue Jun 30, 2009 10:44    Post subject: Still having trouble with the last step... Reply with quote
Frater,
Thank you for correcting that one but i still have the same problem... I really don't get it now.... If i out the link in a browser, i can download the asterisk.sh file but using the wget, it just doesn't download the file. What i did is download it to my deskop and create the file in the /opt/etc/asterisk. But it still does not work. When i launch it with http://192.168.1.1/user/cgi-bin/asterisk , it asks me for a password and after that it shows me the page cannot display in IE. If i use Firefox, it asks me if i want to download the file.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Jun 30, 2009 15:08    Post subject: Reply with quote
You have to give your router's password.. (you're logging into your router)

Did you make asterisk.sh executable by issuing the command "chmod +x asterisk.sh"?

You also have to use MY S90asterisk which makes sure you have a symbolic link in the right place..

Check the output of these commands on your router:

Code:
root@WAN:~# ls -altr /opt/etc/asterisk/asterisk.sh
-rwxr-xr-x    1 root     root        18052 Jun 17 08:36 /opt/etc/asterisk/asterisk.sh
root@WAN:~# ls /tmp/www/cgi-bin/asterisk
/tmp/www/cgi-bin/asterisk
root@WAN:~# ls -altr /tmp/www/cgi-bin/asterisk
lrwxrwxrwx    1 root     root           29 Jun 25 18:30 /tmp/www/cgi-bin/asterisk -> /opt/etc/asterisk/asterisk.sh
root@WAN:~# ls -altr /opt/etc/init.d/S90asterisk
-rwxr-xr-x    1 root     root         2257 Jun 29 22:18 /opt/etc/init.d/S90asterisk

_________________
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)
rikisphinx
DD-WRT Novice


Joined: 22 Jun 2009
Posts: 11

PostPosted: Tue Jun 30, 2009 15:54    Post subject: Reply with quote
Frater,
i did what you wrote in your last post and i noticed that i do have the /tmp/www folder but there are nothing in there, no cgi-bin and certainly no asterisk. I think that those folders for some reason are not created when they should be for some reason...Here is what i get for the commands i issued :
"
root@DD-WRT:~# ls -altr /opt/etc/asterisk/asterisk.sh
-rwxr-xr-x 1 root root 17943 Jun 30 10:35 /opt/etc/asterisk/asterisk.sh
root@DD-WRT:~# ls /tmp/www/cgi-bin/asterisk
root@DD-WRT:~# ls -altr /tmp/www/cgi-bin/asterisk
root@DD-WRT:~# ls -altr /opt/etc/init.d/S90asterisk
-rw-r--r-- 1 root root 2257 Jun 30 06:46 /opt/etc/init.d/S90asterisk

"

I am using putty to connect to the unit and i really can't understand why some folders can't be created or downloaded with the get sintax while for others it works normally
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Jun 30, 2009 16:27    Post subject: Reply with quote
No...
You forgot to make /opt/etc/init.d/S90asterisk executable....
-rw-r--r-- 1 root root 2257 Jun 30 06:46 /opt/etc/init.d/S90asterisk

It's missing the x-flag

Code:
wget -O /opt/etc/init.d/S90asterisk http://wd.mirmana.com/S90asterisk
chmod +x /opt/etc/init.d/S90asterisk
ln -s S90asterisk /opt/etc/init.d/K10asterisk

_________________
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)
Goto page Previous  1, 2, 3, 4 ... 27, 28, 29  Next Display posts from previous:    Page 3 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