Index: asterisk
===================================================================
--- asterisk (Revision 142)
+++ asterisk (Arbeitskopie)
@@ -46,6 +46,7 @@
fi
if [ ! -d /var/spool/asterisk/outgoing ]; then
mkdir -p /var/spool/asterisk/outgoing
+ chown -R asterisk /var/spool/asterisk/outgoing
fi
# if [ ! -d /var/log/asterisk ] ; then
#
# WebIf_rw
#
#
webif_rw_clean:
echo Nothing to do
webif_rw_build:
echo Nothing to do
webif_rw_install:
- mv $(ROOTFS)/www/ $(ROOTFS)/www.ro
cd $(ROOTFS) && ln -s mnt/www www
Hallo Peter,
Hm, nee. Da passiert garnix. Also über die serielle Konsole im Bootloader nicht, und übers LAN Kabel auch nicht :-(
Jo, das hab ich schon alles probiert... hilft nix :-(
Hmpf, das muss doch irgendwie zu schaffen sein, oder?
Noch jemand ne Idee??
Network Settings:
---------------------------
SIP address remapping: Enabled using externhost
Externhost: meinalias.homedns.org
Externip: xxx.xxx.xxx.xxx:5060
Externrefresh: 10
Internal IP: 192.0.2.2:5060
...
SQUASHFS_URL = http://surfnet.dl.sourceforge.net/project/squashfs/squashfs/squashfs4.0/$(SQUASHFS_FILE)
#!/usr/bin/webif-page
<?
. /usr/lib/webif/webif.sh
header "AstSM" "Asterisk" "Asterisk Simple Managment"
conf_path="/mnt/asterisk"
echo '<center>'
#echo '<a href="'$SCRIPT_NAME'">Version</a>'
echo '<a href="'$SCRIPT_NAME'?action=sip_peers">SIP/Peers</a>'
echo '<a href="'$SCRIPT_NAME'?action=sip_channels">SIP/Channels</a>'
echo '<a href="'$SCRIPT_NAME'?action=sip_registry">SIP/Registry</a>'
echo '<a href="'$SCRIPT_NAME'?action=iax_peers">IAX/Peers</a>'
echo '<a href="'$SCRIPT_NAME'?action=iax_channels">IAX/Channels</a>'
echo '<a href="'$SCRIPT_NAME'?action=iax_registry">IAX/Registry</a>'
echo '<a href="'$SCRIPT_NAME'?action=modules">Global/Modules</a>'
echo '<a href="'$SCRIPT_NAME'?action=cust_com">Custom/Command</a>'
echo '<a href="'$SCRIPT_NAME'?action=editor">.conf Editor</a>'
echo '<a href="'$SCRIPT_NAME'?action=reload">Reload</a>'
echo '<br /><br /><br />'
echo '<table><tr><td align=left border=0>'
echo '<pre>'
if [ "$FORM_action" = "reload" ]; then
echo "<h3>Reloading...</h3>"
asterisk -r -x 'module reload'
elif [ "$FORM_action" = "sip_peers" ]; then
echo "<h3>SIP/Peers</h3>"
asterisk -r -x 'sip show peers'
elif [ "$FORM_action" = "sip_channels" ]; then
echo "<h3>SIP/Channels</h3>"
asterisk -r -x 'sip show channels'
elif [ "$FORM_action" = "sip_registry" ]; then
echo "<h3>SIP/Registry</h3>"
asterisk -r -x 'sip show registry'
elif [ "$FORM_action" = "iax_peers" ]; then
echo "<h3>IAX/Peers</h3>"
asterisk -r -x 'iax2 show peers'
elif [ "$FORM_action" = "iax_channels" ]; then
echo "<h3>IAX/Channels</h3>"
asterisk -r -x 'iax2 show channels'
elif [ "$FORM_action" = "iax_registry" ]; then
echo "<h3>IAX/Registration</h3>"
asterisk -r -x 'iax2 show registry'
elif [ "$FORM_action" = "modules" ]; then
echo "<h3>Global/Modules</h3>"
asterisk -r -x 'module show'
elif [ "$FORM_action" = "execute" ]; then
echo "<h3>$FORM_exec_com</h3>"
asterisk -r -x "$FORM_exec_com"
elif [ "$FORM_action" = "" ]; then
#asterisk -r -x 'show version'
asterisk -r -x 'core show version'
asterisk -r -x 'core show file version'
fi
echo '</pre>'
echo '</td></tr></table>'
echo '</center>'
if [ "$FORM_action" = "cust_com" ]; then
echo '<form action="'$SCRIPT_NAME'" method=POST>'
echo '<center>'
echo '<INPUT type=text name="exec_com" value="'$FORM_exec_com'" size="25" maxlength="150">'
echo '<br /><br /><INPUT type="submit" value="@TR<<Accept>>">'
echo '<INPUT name="action" type="hidden" value="execute">'
echo "<br /><br />Enter 'help' for commands details."
echo '</center>'
echo '</form>'
fi
if [ "$FORM_action" = "editor" ]; then
echo '<center><form action="'$SCRIPT_NAME'" method=POST>'
echo '<table style="width: 25%; text-align: left;" border="0" cellpadding="2" cellspacing="2" align="center">'
ls $conf_path/. | awk -F' ' '
{
link=$1
gsub(/\+/,"%2B",link)
print "<tr><td><a href=\"'$SCRIPT_NAME'?action=edit&target=" link "\">@TR<<Edit>></td><td>" $1 "</td></tr></a>"
}'
echo '</table></form></center>'
fi
if [ "$FORM_conf" != "" ]; then
# echo "$FORM_conf"
echo "Save File: "$conf_path/$FORM_target
echo "$FORM_conf" > $conf_path/$FORM_target
# echo "$FORM_conf" | tr -d \r >> $conf_path/$FORM_target
# echo "$FORM_CONF" | sed -e "s/\r//g" > $conf_path/$FORM_target # wegen CR/LF muessen die \r entfernt werden command tr fehlt aber
echo "<pre>$FORM_conf</pre>"
fi
if [ "$FORM_action" = "edit" ]; then
conf_file="$( cat $conf_path/$FORM_target )"
echo '<form action="'$SCRIPT_NAME'" method=POST>'
echo '<center>'
echo 'File Edit: '$conf_path/$FORM_target
echo '<TEXTAREA name="conf" rows="30" cols="100">'
echo -n "$conf_file"
echo '</TEXTAREA>'
echo '<INPUT name="action" type="hidden" value="speichernderconfig">'
echo '<INPUT name="target" type="hidden" value="'$FORM_target'">'
echo '<br /><INPUT type="submit" value="@TR<<Save Changes>>">'
echo '</center>'
echo '</form>'
fi
footer ?>
<!--
##WEBIF:name:AstSM:1:Asterisk
##WEBIF:category:AstSM
-->
#
#!/usr/bin/webif-page
<?
. /usr/lib/webif/webif.sh
header "AstSM" "Asterisk" "Asterisk Simple Managment"
conf_path="/mnt/asterisk"
echo '<center>'
#echo '<a href="'$SCRIPT_NAME'">Version</a>'
echo '<a href="'$SCRIPT_NAME'?action=sip_peers">SIP/Peers</a>'
echo '<a href="'$SCRIPT_NAME'?action=sip_channels">SIP/Channels</a>'
echo '<a href="'$SCRIPT_NAME'?action=sip_registry">SIP/Registry</a>'
[COLOR="Blue"]echo '<a href="'$SCRIPT_NAME'?action=sip_settings">SIP/Settings</a>'[/COLOR]
# echo '<a href="'$SCRIPT_NAME'?action=iax_peers">IAX/Peers</a>'
# echo '<a href="'$SCRIPT_NAME'?action=iax_channels">IAX/Channels</a>'
# echo '<a href="'$SCRIPT_NAME'?action=iax_registry">IAX/Registry</a>'
[COLOR="Blue"]echo '<a href="'$SCRIPT_NAME'?action=dialplan">Dialplan</a>'[/COLOR]
echo '<a href="'$SCRIPT_NAME'?action=modules">Global/Modules</a>'
echo '<a href="'$SCRIPT_NAME'?action=cust_com">Custom/Command</a>'
echo '<a href="'$SCRIPT_NAME'?action=editor">.conf Editor</a>'
echo '<a href="'$SCRIPT_NAME'?action=reload">Reload</a>'
echo '<br /><br /><br />'
echo '<table><tr><td align=left border=0>'
echo '<pre>'
if [ "$FORM_action" = "reload" ]; then
echo "<h3>Reloading...</h3>"
asterisk -r -x 'module reload'
elif [ "$FORM_action" = "sip_peers" ]; then
echo "<h3>SIP/Peers</h3>"
asterisk -r -x 'sip show peers'
elif [ "$FORM_action" = "sip_channels" ]; then
echo "<h3>SIP/Channels</h3>"
asterisk -r -x 'sip show channels'
elif [ "$FORM_action" = "sip_registry" ]; then
echo "<h3>SIP/Registry</h3>"
asterisk -r -x 'sip show registry'
[COLOR="Blue"]elif [ "$FORM_action" = "sip_settings" ]; then
echo "<h3>SIP/Settings</h3>"
asterisk -r -x 'sip show settings'[/COLOR]
elif [ "$FORM_action" = "iax_peers" ]; then
echo "<h3>IAX/Peers</h3>"
asterisk -r -x 'iax2 show peers'
elif [ "$FORM_action" = "iax_channels" ]; then
echo "<h3>IAX/Channels</h3>"
asterisk -r -x 'iax2 show channels'
elif [ "$FORM_action" = "iax_registry" ]; then
echo "<h3>IAX/Registration</h3>"
asterisk -r -x 'iax2 show registry'
[COLOR="Blue"]elif [ "$FORM_action" = "dialplan" ]; then
echo "<h3>Dialplan</h3>"
asterisk -r -x 'dialplan show'[/COLOR]
elif [ "$FORM_action" = "modules" ]; then
echo "<h3>Global/Modules</h3>"
asterisk -r -x 'module show'
elif [ "$FORM_action" = "execute" ]; then
echo "<h3>$FORM_exec_com</h3>"
asterisk -r -x "$FORM_exec_com"
elif [ "$FORM_action" = "" ]; then
#asterisk -r -x 'show version'
asterisk -r -x 'core show version'
asterisk -r -x 'core show file version'
fi
echo '</pre>'
echo '</td></tr></table>'
echo '</center>'
if [ "$FORM_action" = "cust_com" ]; then
echo '<form action="'$SCRIPT_NAME'" method=POST>'
echo '<center>'
echo '<INPUT type=text name="exec_com" value="'$FORM_exec_com'" size="25" maxlength="150">'
echo '<br /><br /><INPUT type="submit" value="@TR<<Accept>>">'
echo '<INPUT name="action" type="hidden" value="execute">'
echo "<br /><br />Enter 'help' for commands details."
echo '</center>'
echo '</form>'
fi
if [ "$FORM_action" = "editor" ]; then
echo '<center><form action="'$SCRIPT_NAME'" method=POST>'
echo '<table style="width: 25%; text-align: left;" border="0" cellpadding="2" cellspacing="2" align="center">'
ls $conf_path/. | awk -F' ' '
{
link=$1
gsub(/\+/,"%2B",link)
print "<tr><td><a href=\"'$SCRIPT_NAME'?action=edit&target=" link "\">@TR<<Edit>></td><td>" $1 "</td></tr></a>"
}'
echo '</table></form></center>'
fi
if [ "$FORM_conf" != "" ]; then
# echo "$FORM_conf"
echo "Save File: "$conf_path/$FORM_target
echo "$FORM_conf" > $conf_path/$FORM_target
# echo "$FORM_conf" | tr -d \r >> $conf_path/$FORM_target
# echo "$FORM_CONF" | sed -e "s/\r//g" > $conf_path/$FORM_target # wegen CR/LF muessen die \r entfernt werden command tr fehlt aber
echo "<pre>$FORM_conf</pre>"
fi
if [ "$FORM_action" = "edit" ]; then
conf_file="$( cat $conf_path/$FORM_target )"
echo '<form action="'$SCRIPT_NAME'" method=POST>'
echo '<center>'
echo 'File Edit: '$conf_path/$FORM_target
echo '<TEXTAREA name="conf" rows="30" cols="100">'
echo -n "$conf_file"
echo '</TEXTAREA>'
echo '<INPUT name="action" type="hidden" value="speichernderconfig">'
echo '<INPUT name="target" type="hidden" value="'$FORM_target'">'
echo '<br /><INPUT type="submit" value="@TR<<Save Changes>>">'
echo '</center>'
echo '</form>'
fi
footer ?>
<!--
##WEBIF:name:AstSM:1:Asterisk
##WEBIF:category:AstSM
-->
#