e**********i 发帖数: 108 | 1 I have Asterisk installed a USB drive on RT-N16 with toastman TomatoUSB
following exactly fiu's dummy guide.
Now the problem is that not only Asterisk won't auto-start after router
reboot, it wouldn't stay on even after I SSH login and manually started
Asterisk,
when I SSH login and manually start Asterisk, I can make calls. once i close
the SsH session, i hear only a busy dial tone when i dial a number. I think
Asterisk closed when I log off SSH, because when I login again, I can start
asterisk again by #asterisk -vvvc, if it stays on, i usually get "asterisk
is already running...."
can somebody please help me out? many thanks | a9 发帖数: 21638 | 2 你那个-c参数是指的以控制台方式运行。你退出ssh当然就关掉了。
你去掉-c让它以默认的daemon方式运行就好了。
自动启动需要启动代码。你在tomato下的话,首先看/opt/etc/init.d下面有没有一个
SXXasterisk文件。其中XX一般是一个两位的数字。
另外就是要执行这个文件启动。tomato有两种方式。
你可以在/opt下创建一个.autorun文件。内容是
#!/bin/sh
if [ -d /opt/etc/init.d ]; then
for f in /opt/etc/init.d/S* ; do
[ -x $f ] && $f start
done
fi
另一个方式是在/opt/etc/config目录下,搞一个wanup文件。内容也是如上内容。
注意用chmod +x /opt/.autorun让其可执行。
close
think
start
asterisk
【在 e**********i 的大作中提到】 : I have Asterisk installed a USB drive on RT-N16 with toastman TomatoUSB : following exactly fiu's dummy guide. : Now the problem is that not only Asterisk won't auto-start after router : reboot, it wouldn't stay on even after I SSH login and manually started : Asterisk, : when I SSH login and manually start Asterisk, I can make calls. once i close : the SsH session, i hear only a busy dial tone when i dial a number. I think : Asterisk closed when I log off SSH, because when I login again, I can start : asterisk again by #asterisk -vvvc, if it stays on, i usually get "asterisk : is already running...."
| e**********i 发帖数: 108 | 3 thanks a lot for your help.
I do have S50asterisk under init.d
so this is what i need to do
copy your scripts into a txt and save as .autorun
put it under init.d
SSH login, and do #chmod +x /opt/.autorun
reboot router
does this sound right? | a9 发帖数: 21638 | 4 恩。
【在 e**********i 的大作中提到】 : thanks a lot for your help. : I do have S50asterisk under init.d : so this is what i need to do : copy your scripts into a txt and save as .autorun : put it under init.d : SSH login, and do #chmod +x /opt/.autorun : reboot router : does this sound right?
| e**********i 发帖数: 108 | 5 谢谢,这个问题终于弄好了。 现在能打人打出,但是通话质量很差,试试微调一下
sipura看看会不会好点。
现在打进来的时候,虽然能通,可显示还有两errors,google了一下,在modules.conf
加了load => app_senddtmf.so,load => func_odbc.so,load => func_db.so,问题
依旧。试过autoload=yes也不行,不知道什么原因。错误信息如下:
[Oct 10 09:37:11] ERROR[1276]: pbx.c:3669 ast_func_read: Function DB_EXISTS
not registered
-- Executing [M***[email protected]@google-in:1] GotoIf("Gtalk/+17778889999-
4b7e", "?bridged") in new stack
-- Executing [M***[email protected]@google-in:2] NoOp("Gtalk/+17778889999-4b7e
", "Callerid +**********[email protected]/srvres-MTAuMjI5LjEyOC41Ojk4MDA="
) in new stack
-- Executing [M***[email protected]@google-in:3] Set("Gtalk/+17778889999-4b7e"
, "CALLERID(num)=+17778889999") in new stack
[Oct 10 09:37:11] ERROR[1276]: pbx.c:3669 ast_func_read: Function DB not
registered
-- Executing [M***[email protected]@google-in:4] Set("Gtalk/+17778889999-4b7e"
, "CALLERID(name)=") in new stack
-- Executing [M***[email protected]@google-in:5] Dial("Gtalk/+17778889999-4b7e
", "SIP/101, 180, D(:1)") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/101
-- SIP/101-00000005 is ringing
-- SIP/101-00000005 answered Gtalk/+17778889999-4b7e
-- Sending DTMF '1' to the calling party.
== Spawn extension (google-in, M***[email protected], 5) exited non-zero on '
Gtalk/+17778889999-4b7e' | e**********i 发帖数: 108 | 6 ok, i think i just figured it out. I might be missing a enter key while
editting modules.conf, so those functions didn't get added. now the error
message is gone. |
|