- 博客(24)
- 收藏
- 关注
原创 FXO(外部交换局) FXS(外部交换站)
FXO端不生成拨号音,而是接收,FXS端口提供拨号音和震铃电压,在有呼的时候提醒用户。如果Asterisk 服务器有一个兼容的FXO的端口,就可以把(电信或网通)电话线接入这个端口。如果有一个FXS端口,就可以连接一部模拟电话,Asterisk就可以呼叫这部电话。端口是通过配置使用的信令进行定义的,而不会是物理端口类型。...
2010-09-25 11:10:38 326
原创 Asterisk配置文件
zaptel.conf 硬件接口基层配置,建立一个FXO和一个FXS通道zapata.conf 为硬件配置Asterisk的接口extensions.conf 创建拨号方案sip.conf 配置SIP协议iax.conf 配置呼入和呼出IAX通道 如果不使用语音卡,中用配置sip即可...
2010-09-25 10:48:35 118
原创 PostgreSQL
su postgres -c psqlcreate database django;create uesr django;alter user django with password 'django';alter database django owner to django;
2009-09-04 16:58:39 222
原创 lighttpd虚拟主机目录匹配
比如要匹配a.example.comwww.example.com在lighttpd中$HTTP[”host”] =~ “(^|\.)example\.com” {…}
2009-09-04 13:43:41 222
原创 Django最佳实践-使用相对路径
import osTEMPLATE_DIRS = ( os.path.join(os.path.abspath(os.path.dirname(__file__)), 'templates'),)
2009-09-01 16:48:59 1435
原创 lighttpd django配置
安装cgi的python包,叫 flup建立一个hello.fcgi的文件#!/usr/bin/pythonimport sys, ossys.path.insert(0, "/your dir/")os.environ['DJANGO_SETTINGS_MODULE'] = 'your modules.settings'from django.core.servers....
2009-09-01 09:36:36 219
原创 Django删除
为了更新Django 为1.1版本,需要把旧版删除 1. python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" 显示site-packages所在路径 cd /usr/lib/python2.5/site-packages rm -R -f djang...
2009-09-01 08:59:14 145
原创 bitbucket初试
clone到本机 hg clone http://bitbucket.org/user/project初始django项目 django-admin.py startproject project1cd project1 hg init添加 hg add提交 hg commint -m "inital project"导入到 bitbucket h...
2009-08-24 17:19:26 123
原创 asterisk 删除
先停止asterisk运行然后删除rm -rf /etc/asteriskrm -f /etc/zaptel.confrm -rf /var/log/asteriskrm -rf /var/lib/asteriskrm -rf /var/spool/asteriskrm -rf /usr/lib/asterisk
2009-08-14 15:30:52 127
原创 dvipdfmx div->pdf
apt-get install dvipdfmxlatex index.texdvipdfmx index.dvi
2009-08-12 11:04:01 343
原创 latex 首行缩进
\usepackage{indentfirst}如果用了CJK,可以加\CJKindent如果有一个段落你不想首行缩进, 在段落前使用命令 \noindent .
2009-08-11 16:57:48 867
原创 latex(cjk) says 你好世界
最近写我自己的书,一直在找一个趁手的排版工具。今天终于弄好了 latex+CJK 可以输入中文了 安装 latex安装 CJK apt-get install cjk-all下载安装字体ftp://cle.linux.org.tw/pub2/tex/cjk/fonts/nsungt1/nsungt1-1.4.2.tar.gzhelloworld.tex\document...
2009-08-11 15:59:39 241
原创 asterisk 说 hello-world
[aggui]exten => 8888,1,Answer()exten => 8888,2,Playback(hello-world)exten => 8888,3,Hangup()asterisk安装文件中带一个语音文件 hello-world
2009-08-07 16:00:20 171
原创 asterisk extension.conf 中万能的 n
extension.conf 中万能的 nn priorityexten => 1234,1,Answer()exten => 1234,2,Wait(2)exten => 1234,3,Playback(hello-world)exten => 1234,4,Wait(2)exten => 1234,5,Hangup()=exten ...
2009-08-07 15:27:35 262
原创 使用nslookup进行MX检测
nslookup nslookup> set type=mx>example.comServer: 10.4.0.1Address: 10.4.0.1#53Non-authoritative answer:example.com mail exchanger = 50 aspmx3.googlemail.com.examp...
2009-08-07 11:11:49 243
原创 asterisk 参数
[general]port = 5060 #sip标准端口bindaddr = 0.0.0.0 #asterisk listen所有ipcontext = others[2001] #字母也可以如,[reception-1]type=friend #可以接听与拨打电话context=my-phones secret=1234 #使用数字较方便有话机输入...
2009-07-30 17:58:41 217
原创 asterisk voicemail配置
配置无人应答时候的语音信箱 debian:/# cd /etc/asteriskdebian:/etc/asterisk# mv voicemail.conf backup/ voicemail.conf [general]format = wav[default]2000 => 4711,Foo Bar,foo@bar.com2001 => 0...
2009-07-30 16:58:26 423
原创 asterisk says "hello world"
cd /etc/asterisk backup the confs debian:/usr/src# cd /etc/asterisk debian:/etc/asterisk# mkdir backupdebian:/etc/asterisk# mv sip.conf backup/debian:/etc/asterisk# mv extensions.conf bac...
2009-07-30 16:02:18 182
原创 debian 上安装 asterrisk 1.4
apt-get updateapt-get -y upgrade apt-get -y install build-essential libncurses5-dev libcurl3-dev libvorbis-dev libspeex-dev unixodbc unixodbc-dev libiksemel-dev linux-head...
2009-07-30 11:05:49 221
原创 Samba配置
samba - LanManager-like file and printer server for Unix.libsmbclient - Shared library that allows applications to talk to SMB servers #apt-get install samba samba-client ...
2009-07-30 10:11:14 85
原创 Samba不显示隐藏文件
不显示隐藏文件[home]加上 veto files=/.*/veto files 为设定禁止文件 Monday, May 11, 8:31 PM
2009-06-11 13:09:45 1839
原创 Debian root 密码
记性越来越差了,才安装的Debian密码就已忘记。幸好在网上找找很快就能找到解决方法grub选项下选'Debian GNU/Linux,...(recovery mode)',按e进入编辑模式编辑kernel行最后面的 ro single 改成 rw single init=/bin/bash,按b执行boot进入后执行下列指令 root@(none)#mount -a ...
2009-06-05 14:56:13 460
Django admin中不能显示中文
def __unicode__(self):return u“%s %s %s “ % (self.user, self.entry, self.get_rating_display())
2009-04-28 08:13:53 233
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人