一年的成果 — Cisco ATA 187

Thanks for everyone that worked with me and made it happen.

http://www.cisco.com/en/US/prod/collateral/voicesw/ps6788/phones/ps514/ps11026/data_sheet_c78-608596.html

Product Overview

The Cisco® ATA 187 Analog Telephone Adaptor is a handset-to-Ethernet adaptor that turns traditional telephone devices into IP devices. Customers can take advantage of the many new and exciting IP telephony applications by connecting their analog devices to Cisco ATAs.

The Cisco ATA products are standards-based communication devices that deliver true, next-generation voice-over-IP (VoIP) terminations to businesses and residences worldwide.

• Protects existing telephone investment: The Cisco ATA 187 supports two voice ports, each with its own independent telephone number, and a single RJ-45 10/100 BASE-T Ethernet port. This adaptor can make use of existing Ethernet LANs in addition to broadband pipes such as DSL, fixed wireless, and cable modem deployments.

• Cost effective: The Cisco ATA 187 helps customers turn their analog phone devices into IP devices cost effectively and is the preferred solution to address the needs of customers who connect to enterprise networks, small-office environments, or the emerging VoIP managed voice services and local services market.

Enterprise customers are using the Cisco ATA 187 to connect analog phones and fax machines to their VoIP network. Service providers are taking advantage of emerging telephony applications and the ease of deploying second-line services using the Cisco ATA 187 (Figures 1 and 2).

Figure 1. Cisco ATA 187: Endpoint for an End-to-End Broadband System

Figure 2. Cisco ATA 187 as Endpoint in Session Initiation Protocol (SIP) Network

* DSL and cable mode need SIP support.

Features and Benefits

Table 1 lists the features and benefits of the Cisco ATA 187.

Table 1. Features and Benefits

Feature

Benefits

Configuration and Provisioning

• Configuration as per Cisco endpoints devices

• Autoprovisioning with Trivial File Transfer Protocol (TFTP) for servers

• Automatic assignment of IP address, network routing IP, and subnet mask using Dynamic Host Configuration Protocol (DHCP)

• Touch-tone telephone keypad configuration with voice prompt

• Administration password to protect configuration and access

• Remote upgrades through network

• Cisco Unified Communications Manager (UCM) standard configuration and provisioning options

• Ease of administration

Voice Quality

• Advanced preprocessing to optimize full-duplex voice compression

• High-performance line-echo cancellation to eliminate noise and echo

• Voice activity detection (VAD) and comfort noise generation (CNG) to save bandwidth by delivering voice, not silence

• Dynamic network monitoring to reduce jitter artifacts such a packet loss

Clear, natural-sounding voice quality

Signaling Protocol

• Session Initiation Protocol (SIP) on the Cisco line side

Allows interoperation with Cisco UCM SIP solution

Security

• Secure Real-Time Transfer Protocol and Transport Layer Security (SRTP/TLS) over SIP

Secure media and secure signaling support, for secure solutions

Fax Support

• T38 fax support

Standard fax capability to send faxes over the IP network

Form Factor

• Fits in most environments

New form-factor design based on the Cisco endpoints portfolio

Cisco UCM Version Compatibility

• Cisco UCM Versions 7.1.5, 8.0.2, or higher

Product Specifications

Table 2 presents the specifications for the Cisco ATA 187.

Table 2. Product Specifications

Physical Specifications

Power

Power supply: Universal AC power supply 110 and 240V

Power adaptor output voltage: +12.0 VDC at 1A maximum

Noise level

Less than 34 dBA at 3 feet

Connectors

2 RJ 11

Thermal

Operating temperature: 23 to 113°F (5 to 45 °C)

Non-operating temperature: -13 to 158ºF (-25 to 70ºC)

Humidity

Operating humidity: 5 to 95% noncondensing

Mean time between failure (MTBF)

100,000 hours

Physical dimensions

(H x W x D) and weight

Dimensions: 1.5 x 5.4 x 6.7 in. (3.8 x 13.7 x 17.0 cm)

Weight: 9.2 oz (260g)

Compliance

RoHS- and WEEE-compliant materials

On-off switch

To turn device on and off

Software Specifications

Cisco ATA SIP services

• IP address assignment: Provided by DHCP or statically configured

• Cisco ATA configuration through Cisco UCM configuration interface

• VLAN configuration

• Cisco Discovery Protocol

• Low-bit-rate codec selection

• User authentication

• Configurable tones (dial tone, busy tone, alert tone, reorder tone, and call-waiting tone)

• Dial plans

• SIP proxy server redundancy

• Privacy features

• Domain Name System (DNS) service (SRV) support

• User-configurable, call waiting; permanent default setting

• Comfort noise during silence period when using G.711

• Advanced audio mode

• Caller ID format

• Ring cadence format

• Silence suppression

• Hook-flash detection timing configuration

• Configurable on-hook delay

• Type of service (ToS) configuration for audio and signaling Ethernet packets

• Debugging and diagnostic tools

SIP services

Cisco ATA supports the methods listed here (for more information, refer to RFC-3261):

• REGISTER

• REFER

• INVITE

• BYE

• CANCEL

• NOTIFY

• OPTIONS

• ACK

• SUBSCRIBE

Supplementary services

• Caller ID

• Call-waiting caller ID

• Voice-mail indication

• Conference call

• Call waiting

• Call forwarding

• Calling-line identification

• Unattended transfer

• Attended transfer

• Shared line

• Speed dial

• Meet me

• Pick up

• Redial

Other supported protocols

• IEEE 802.1Q VLAN tagging

• Cisco Discovery Protocol

• DNS

• DHCP

• Internet Control Message Protocol (ICMP)

• IP

• Real-Time Transport Protocol (RTP)

• TCP

• Trivial File Transfer Protocol (TFTP)

• User Datagram Protocol (UDP)

Fax services

The Cisco ATA supports two modes of fax services, in which fax signals are transmitted using the G.711 codec:

• Fax pass-through mode: The mode enables receiver-side called-station-identification (CED) tone detection with automatic G.711A-law or G.711μ-law switching.

• T38 fax relay mode: The T.38 fax relay feature enables devices to use fax machines to send files over the IP network. In general, when a fax is received, it is converted to an image, sent to the T.38 fax device, and converted back to an analog fax signal. T.38 fax relays configured with voice gateways decode or demodulate the fax signals before they are transported over IP.

Note: Success of fax transmission depends on network conditions and the fax modem response to these conditions. The network must have reasonably low network jitter, network delay, and packet loss rate.

Voice codecs supported

• G.711μ-law

• G.711A-law

• G.729

• G.729A

• G.729B

• G.729AB

SRTP/TLS

• SRTP secures voice conversations on the network and provides protection against replay attacks.

• TLS is a cryptographic protocol that secures data communications such as email on the Internet. TLS is functionally equivalent to SSL.

VoIP specifications

• LAN port: One RJ-45 10/100BASE-T Fast Ethernet port

• Quality of service (QoS): Precedence setting and differentiated services code point (DSCP)

Call progress tones

Configurable based on network locale

Line-echo cancellation

• Echo canceller for each port

• 8-millisecond (ms) echo length

• Nonlinear echo suppression (echo return loss [ERL] greater than 28 dB for f = 300 to 3400 Hz)

System Requirements

Figure 3 shows the system setup.

Figure 3. System Setup

 

Asterisk Realtime with Mysql

Asterisk的强大功能让我第一眼就喜欢上了它,但是需要配置如此之多的conf文件实在让人有点受不了。
From Readme.extconfig for Asterisk Realtime Engine

The Asterisk external configuration engine is the result of work by Anthony Minessale II, Mark Spencer and Constantine Filin It is designed to provide a flexible, seamless integration between Asterisk's internal configuration structure and external SQL other databases (maybe even LDAP one day).


External configuration is configured in /etc/asterisk/extconfig.conf allowing you to map any configuration file (static mappings) to be pulled from the database, or to map special runtime entries which permit the dynamic creation of objects, entities, peers, etc. without the necessity of a reload.

这不就是我想要的么,动手是我的一贯原则,马上来。
前提
由于需要调用Mysql,所以需要先安装mysql-common,mysql-server,mysql-client,libmysqlclient-dev。
Step 1 安装Asterisk-Addon
在www.asterisk.org的网站上下载Asterisk-Addon,解压缩以后进行安装。

sudo ./configure
sudo make
sudo make install
sudo make samples

需要注意的是,执行configure这步没有mysql也是可以过得(Checking mysql_config … No),但是最后汇报错”Find Engine Mysql, but it is not available”.我已开始在这边耽误了很久,所以请注意前提中要求的几个包。

Step 2 配置/etc/asterisk/res_mysql.conf
在“ [general]”下增加如下配置。

dbhost = localhost
dbname = asterisk
dbuser = username
dbpass = password
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

基本的数据库配置,没啥好说的。

Step 3 配置/etc/asterisk/extconfig.conf
extconfig主要分成static 和database两种模式。
static 模式就是在”reload”的时候一口气全部从数据库中读出配置信息,储存在Memory中;database模式就是实时的按照需要从数据库中读取。这里我选择的是database,希望朝stateless asterisk靠拢。
在extconfig的”[settings] “中增加如下配置。

sippeers => mysql,general,sip_peers
sipusers => mysql,general,sip_users
queues => mysql,general,queue_table
queue_members => mysql,general,queue_member_table
meetme => mysql,general,meetme_table
voicemail => mysql,general,voicemail
extensions => mysql,general,extensions_table

这里需要注意的是,网上很多教程里写的配置格式是<driver>,<database name>[,table_name].但是在Asterisk 1.6.1或者以上的版本中正确的配置格式应该是<driver>,<settings name>[,table_name]。其中的<settings name>指的是res_mysql.conf中的”[general]“.
Step 4 创建数据库
这部分我就不多说了,没有什么不同。具体各个部分配置对应的数据表结构可以在我给出的参考地址中找到,我就不多说了。

Step 5 运行起来
还等什么运行起来。

sudo asterisk -vvvvc

然后在sip_peers中添加一条用户信息。不需要重起asterisk,直接用Xlite进行连接,哇塞,直接就注册上了,神奇的意思就是这个。

遗留问题
1)按照参考连接中的说法,database config不支持SIP NAT.这肯定是要克服的一个问题,回头再找找看资料了。
2) Realtime只是Asterisk集群,负载均衡的基石,要作大规模的Asterisk服务,Asterisk的集群技术和基于SIP的负载均衡技术都是下一个需要研究的课题。

参考地址:http://www.voip-info.org/wiki/view/Asterisk+RealTime

 

VPS攒机经历(7)

最后还是选择了三个月rashost,皑皑,没办法,用的爽才是硬道理,安装维护都要方便很多。
对于系统一流问题也有了一些update.
对于系统以及进程的监控发现了如下的解决方案
1)htop
很方便的console下的监控软件,进程,系统地内容,cpu都可以一清二楚
2)munin
twitter目前使用的系统监控软件,可以很方便的监控系统各个资源的使用情况,包括apache, mysql等等,还可以生成报表。
3)god
ruby的gem.可以监控mongrel的memory, cpu,并自动重起服务(需要研究对lighttpd,fastcgi的控制)
 
 
对于rails的框架选择
参考了网上很多资料以后,最终选择了javaeye的lighttpd + fastcgi的实现方式。
同时选用了ruby enterprise作为运行环境(本来ruby enterprise是人家公司和mod_rails合作的,皑皑,可惜了)
修改的方法也很方便,直接修改public/dispatch.fcgi中的ruby命令就可以了。
相关的问题是需要为ruby enterprise重新安装一遍所有的gem
目前系统基本稳定在230M左右的内存占用上。
 
其他相关的内容
1安装uchome
2安装ucenter
3安装discuz
4安装ecshop
5安装wordpress
6安装munin
7mapping domain name to ip
8安装phpmyadmin
 
遗留问题
1)如何为munin设置二级域名,如果成功可以推广到其他模块

 

“Favorite Links” Kick Off (my second application of facebook )

xiu’s to do list, 遭遇惨败,至今也没有谁用,抑郁了...希望有空写一下总结.
不过我热爱facebook的心仍然不改,收拾心情,于是我的第二个facebook application — favorite links出发了.
 
Favorite Link
初衷
基本的想法就是在网上找一个可以存放收藏夹的地方.
然后借鉴facebook的互动性可以让朋友之间通过public 或者 private来share 好的网站地址.
或者给个价钱,或者评议个星之类的.
 
技术架构
Facebook + RFacebook + Heroku
RFacebook是基于Ruby on Rails的Facebook客户端.
Heroku是基于Ruby on Rails的免费虚拟主机,更加提供了非常cool的浏览器编辑器,很赞.
一直想学习一下Ruby on Rails, 又正好申请到了Heroku得主机,自然要合在一起玩一把.
 
目前解决的问题:
1)RFacebook , Rails 2.0
要兼容Rails2.0, RFacebook需要修改config/environment.rb的两处地方
config.action_controller.session_store = :active_record_store
config.action_controller.allow_forgery_protection = false
 
当然别忘了按照提示创建session table.
 
2)RFacebook的配置
主要遇到的问题是
facebook.yml中的两处配置
canvas_path: /favoritelink/
callback_path: /
这两处都是相对路径,之前写了全路经,就看到facebook, heroku之间一直来回forward.
 
 
 

 

无觅相关文章插件,快速提升流量