Asterisk

Asterisk Update – Summer 2005

#############################################################################
Please enter any comments or notes in the three entries below (problems, required features, desired features) rather than updating my notes further down the list. I will merge comments and requests in with my notes as I read and absorb them. You may be as absurd as you want with the desired features, as Asterisk can be made to do quite a lot. I’m not promising anything, but there’s quite a lot we can potentially do.
[email protected]
#############################################################################

List of problems with current system
————————————

* Echo on IP phones
* Lack of comprehensive documentation

#############################################################################

List of required features/actions
———————————

* Call Data reporting
* Update firmware on Grandstream IP phones
* Steven should be able to pick up help desk calls
* Fix calling to Victoria Freenet office
* Set up softphones for helpdesk
* Upgrade IP phone firmware – Completed 2005-07-05
* Improve voicemail greeting

#############################################################################

List of desired features
————————

* Integrate Asterisk and RT
* Integrate Asterisk and fax system. (A help desk fax might be useful)

#############################################################################
#############################################################################

Echo on IP phones
—————–

from http://www.digium.com/index.php?menu=faq
———————————————

Q.
Why do I hear echo when I make a call?
A.
In the analog phone world, FXS and FXO interfaces combine the receive and transmit signal on a single pair using a device called a hybrid. Because the transmitted and received signal are on the same wire, part of the transmitted signal comes back along with the received signal. On strictly TDM (a.k.a. circuit-switched) networks, the echo comes back so fast that it is indestiguishable from the “sidetone” that you are used to hearing anyway, and so you don’t notice it. However, if there is a delay in the line (for example if you are using an IP phone, or going across the Internet) then the echo occurs later, and its presense will annoy you.

Q.
How can I eliminate echo?
A.
Zaptel interfaces may be configured to use a feature called “echo cancellation” to try to eliminate the echo from the received signal. In your zapata.conf, be sure you have: echocancel=yes, echocancel=32, echocancel=64, echocancel=128, or echocancel=256 and echocancelwhenbridged=yes to enable echo cancellation. echocancel=yes defaults to the value of 128. You can also tweak echo parameters and choose which implementation in the zaptel Makefile. There is no configuration for Asterisk to help eliminate echo on IP calls. There should also be no echo on PRI connections.

This says: “There is no configuration for Asterisk to help eliminate echo on IP calls.” Hmmm….

Is there any queuing in place that prioritizes the VOIP traffic? It’s all going through the same switch as all the help desk ethernet traffic. Maybe give it its own switch? Would that even help?

1. Determine what the source of the echo is.
– Is it coming from the X100P card?
– Is it caused by the Grandstream phones?
– Does the echo appear when using a softphone?

#############################################################################

Graphs and call analysis
————————
There needs to be a web-based tool for generating graphs, and the reports and graphs should be modifiable.

** Tools **
———–
[note: see descriptions and notes in 9. monitoring, managements, & user interface tools}]

* Asterisk-Stat (http://areski.net/asterisk-stat-v2/about.php)
(this is included in Asterisk UI, and Asterisk Management Portal)

#############################################################################

Integrate voicemail with email and RT
————————————-

#############################################################################

Steven should be able to pick up help desk calls if he wants to
—————————————————————

– Pick up help desk calls
– probably implement using a manager interface, allowing arbitrary transferring of calls to his own extension. An interface developed for call centers might have a feature like this.
– it could ring at his ext on line 2
– pick up phone and transfer live call to his phone.
– add his phone to the dialled phones on the fly.

– add his phone to the dialled phones on the fly.

– View help desk phone activity
– This should be live data, and ditto for a call center app, as above.

– Listen in on help desk calls? Uneccessary.
– Asterisk commands: ZapBarge and ChanSpy. There are also commands for recording calls.
– http://www.voip-info.org/tiki-index.php?page=PBX%20Call%20Pickup (info about picking up calls ringing at a different phone)
– A little bit more: http://www.voip-info.org/tiki-index.php?page=Asterisk+config+features.conf
[note: the two links, above: #1 describes the feature in a genereic pbx system, and #2 gives brief details about asterisk implementation. VERY brief.]

#############################################################################

Calling to Victoria freenet office via iaxtel.com number
——————————————————–

They have their own asterisk server.
These calls don’t seem to work anymore… This needs to be tested.

—————
from old notes:
—————

To dial victoria press 1 250 727 2489 (for Gary and the whole gang). This is an internet call that does a lookup on the phone number and dials the matching internet phone number. You can also reach anyone else over the internet if they’ve registered the phone number at e164.org.

————————————————————-

#############################################################################

Soft phones
———–

[20050624] I installed SJphone on the help desk winxp pc and was able to dial the help desk extensions, and an external telephone number. I was unable, however, to hear anything on the headset. This may be due to some sort of sound card misconfiguration…? It could be that the sound card (onboard) doesn’t support full-duplexing… suggested by the SJphone documentation.
I was able, though, to install X-Lite and the sound worked fine. I made an outgoing call and it worked perfectly, no echo or anything.


Windows
* Dante’s DIAX Software Phone (http://www.laser.com/dante/diax/diax.html) IAX2 only.
* SJphone
* X-lite

#############################################################################

Fax

Not sure if it would be useful…
What could it be used for?

* Integrate Hylafax
*

#############################################################################

Upgrade
——-
Look at ways of slimming down the server.
-reduce size of linux installation and reduce amount of running processes.
-reduce number of loaded modules
Neccessary applications:
-Asterisk
-httpd
-mysql
Should the database and web-based management and reporting tools be on a second machine?
-is it better to increase network traffic to reduce processor and memory load, or vice versa?
Start building a new server

#############################################################################

monitoring, managements, & user interface tools
———————————————–

+—————————————-+
from Lyndon’s notes, updated by glenn.
(Lyndon’s original comments are in “{}”)
FROM voip-info.org: Asterisk GUI page
+—————————————-+

* ACTOS: GUI tool for editing .conf files and setting up all aspects of an Asterisk server (client/server support, wizards for dial plan creation,… ). Non-web GUI; only French and Russian documenation available so far. – doesn’t seem worthwhile.

* AM (Asterisk Manager): Web-based Perl tool for configuring and managing Asterisk. This might be worth checking out, as it seems a pretty decent tool for modifying conf files without using a text editor. But, in order to use the admin functions, the scripts must be running on the Asterisk server.

* AM-Web : – {Skipped no cisco phone so useless}

* Astegui: Allinone tool for eGroupWare, (currently under development) – doesn’t seem useful, and the documentation and website seem to be only in French.

* Asterisk AstUI: {Web tool, change SIP passwords, Asterisk status, using
Asterisk Monastery and Asterisk CDR Areski GUI.
– Seems to be the most popular and most useful and integrated. has a operator
panel, same as astman/gastman functions, but I can’t get flash work with a
client-server connection.} I couldn’t find info on this tool. The Asterisk AstUI page on the voip-info wiki was empty. And the application didn’t appear in the Asterisk GUI list (also on the voip-info wiki). Perhaps it is no longer active? I think this may now be: Asterisk Management Portal/AMP. Or it could be Asterisk UI. It is Asterisk UI, for which all docs seem to be in German. It’s what is installed right now on the Asterisk server. Makes sense to stick with it and just upgrade, I guess. AMP might give a cleaner interface…

* Asterisk Call Manager: – {Skipped like astman, but can execute * console command, record calls, speed dial people. for switchboard operators.} I couldn’t find this project listed either, but it might be: Asterisk Call Manager for Windows.

* Asterisk Call Manager for Windows: Written in VB6, runs only on Windows (see: Asterisk Call Manager).

* Asterisk Flash Operator Panel: {realtime web-based status viewer for
extensions, allowing hangup/transfer. – Included in Asterisk AstUI}

* Asterisk Management Portal: Also known as AMP. Integration of several tools into one package (see AstUI). Uses MySQL to store configuration data, then apparently updates the asterisk .conf files. Not sure if it’s a good idea to get tied into this. The most useful component is Asterisk-Stat, which is a tool for generating CDR reports. Perl-based.

* Asterisk-Stat (cache): {View nicely processed call statistics (PHP, GD library) – Included in Asterisk UI. Nice graphs you create on the fly from cdr-mysql data.} (see note on Asterisk Management Portal) Supports both mysql and postgresql.

* Asterisk Switchboard Application: – {Skipped don’t want switchboards}

* asterisk.toad.net/qview.pl: – {Skipped web queue viewer, we don’t use call Q’s}

* Asterisk Web Web CDR reports. {Included in AstUI} I’m not sure what this is, I couldn’t find info on it on voip-info wiki.

* AsterWatch: C# extendable manager: – {Skipped Haven’t installed, but is graphical.} This project appears to be dead.

* Astguiclient: Perl/TK Asterisk GUI client.{ – Skipped, but from screenshots seems like a operator base GUI, like gastman} Runs on Win or X, seems designed for use in a call center (tightly integrated with a list dialer called VICIDIAL auto-dialer).

* astman: – {shell based, after you enter the manager password, you can see
active calls and transfer or hangup the call.} Can be run from another pc across a tcp connection. (see also: gastman)

* AstTapi Omniss Asterisk TAPI driver – {skipped, uses some obsure modem driver TAPI, to connect to a remote computer and execute commands}

* AstWeb: Web CDR reports. – {Included in AstUI} Web interface for configuring Asterisk and CDR reports. Last update to this project was Sept 2003. Seems obsolete. Might be included in AMP.

* Caller ID display – {Skipped don’t need as SIP phone show CID info}

* CDRTool: utlilty for analysing call data, but seems designed for use in billing, like for a service provider. Also is a commercial product, only available for free as an eval copy. Not free for commercial use, and not open-source, as far as I could tell.

* gastman: – {same as astman, but graphical. You can run it remotely using ssh.}

* Gofti AStApp: Database driven configuration tool with history and simple CDR display (use ‘guest’ as username and password) – doesn’t seem like a good idea. Their website was only a demo and I couldn’t find documentation anywhere. I didn’t try downloading it, though.

* MeetMe Control (cache): Manage conference room participants (PHP) – {Skipped} Seems to be written by the same person as Asterisk-Stat.

*Monastery: {web-based status viewer for extensions & voicemail
– Included in Asterisk UI. Good status page that uses a telnet connection on
localhost to maKE A mysql connection that constantly queries asterisk and put
the info into a db} Shows status of each phone (SIP and IAX) as well as voicemail messages (quantity in each mailbox, not the actual message). Might not be worth the overhead of the constant mysql querrying.

* phpconfig: {php web based * files editor and parser. In development still.
Lets you edit the raw *.conf files via web. Currently any can view the *.conf
and see your password, but they are working on a login page. You have to input
the manager password to save your edited file, (but you can find this out by
viewing manager.conf: security hole)} THIS PROJECT IS NO LONGER ACTIVE??

* PHP Status Viewer (cache): – {Skipped Simple}

* vmail.cgi: {Vmail.cgi is a script to read voicemail. The
script is distributed with Asterisk. – Skipped Haven’t run, but know it allows you to listen/download the raw vm message ie msg0001.wav file, through a browser} requires perl and perl-suidperl, as well as a webserver. (suidperl doesn’t exist on RedHat so /var/spool/asterisk/voicemail/files needs to be readable by httpd user… is this a security problem?– I got this from the vmail.cgi page on the voip-info wiki)

* WAMi: Windows Asterisk Management Interface: – {Skipped allows you to
call people from outlook or addressbook, by clicking on their name. Runs on
Windows}

* Web queue viewer (cache) – {PERL, see also bug 236 (cache)} I couldn’t find any info for this on the voip-info wiki.

* Windows Call Manager and Outlook Dialer written in C# and .NET) – {Skipped, same as WAMI?}

+————————————-+
| *** Non-Asterisk-Specific tools *** |
+————————————-+
[note: these are mostly network monitoring tools that could watch Asterisk in addition to everything else]

* Nagios (http://www.nagios.org/)
* Argus (http://argus.tcp4me.com/)

#############################################################################

documentation
————-

We should end up with a VCN Asterisk handbook….

1. Glossary of Terms

o PSTN = Public Switched Telephone Network i.e. the phone service we use for every ordinary phone call.
o FXS = Foreign Exchange Station. Connects to a phone.
o FXO = Foreign Exchange Office. Connects to an outside line.
o POTS = Plain Old Telephone System.
o ADSI = Analog Display Services Interface. Used to interact with softphones remotely.

2. Overview of system

* Current setup
—————
(See /home/volunteer/asterisk_tmp/base_graph.dot for more specs)
Asterisk server:
CentOS ((Red Hat Linux 3.2.3-34))
Asterisk CVS-HEAD-08/31/04-11:11:47
Apache/2.0.46
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

cards:
Digium X100P 1 port FXO card connected to outside line (604-257-3810)
Digium X100P 1 port FXO card connected to outside line (604-257-3811)
Digium TDM400P (TDM20B) card with 2 FXS ports and 0 FXO ports (for connecting analog phones to Asterisk)

3. Configuration Files
* zaptel.conf
* zapata.conf
* sip.conf
* iax.conf
* extensions.conf
* voicemail.conf
* cdr_mysql.conf
* cdr_pgsql.conf
* asterisk.conf
4. How-to (add a new phone, change voicemail options, etc…)
5. Upgrade instructions

#############################################################################

Dynamic voice content (like VoiceXML) (??)
——————————————

#############################################################################

CDR (Call Data Record) Analysis
——————————-

– What database to use? Currently it’s mysql. Postgres could be used, but might not be as fast as mysql? There’s probably no need to switch.

– What is the best tool (or set of tools) to use for grpahing, reporting, and analyis?

#############################################################################

Differences between installed version and latest release
——————————————————–

– Installed version is CVS-HEAD from 2004-08-?? which probably corresponds to v1.0 RC1 or RC2
– Latest point release is 1.0.8, released 2005-06-??
– No new features but many bugs fixed

#############################################################################

Update firmware on Grandstream phones
————————————-

– Set up tftp server to serve latest firmware
– Prepare the system and document well so that it can be done easily in the future.

– Upgrade completed 2005-07-05
– Help Desk phones are set to automatically check 168.75.215.189 (Grandstream’s tftp server) for firmware upgrades every 7 days.
– I also set the phones to have static IP addresses (served by DHCP from 192.168.1.225) based on their extension numbers (i.e. the phone at extension 100 has ip address 192.168.1.100, etc). Changes to the ip addresses should be made to the dhcpd.conf file on the server, then dhcpd should be restarted, then the phone needs to be power-cycled.

#############################################################################
other phone servers
——————-

* http://www.iptel.org/ (Home of SER (SIP Express Router))

#############################################################################
Improve voicemail greeting
————————–

The phone message is missing address and time information for people to
get one-to-one help – especially during Monday training – currently 2
people are here to help every Monday. I suggest the below and an
alternate message for when the service is unavailable. Peter

Peter Royce
Vancouver Community Network
604 606 2603 f 604 257 3808
http://www.vcn.bc.ca

General VCN Message:
——————–
Hi, you�ve reached the Vancovuer Community Network Helpdesk, press pound
(?) to skip this message.

If you have a problem accessing your VCN account, leave a message with
your name, your email address and your phone number plus a clear
description of the problem you are having.

If you are a new user, consider coming to our �First�time User
Introduction� at 11 am every Monday � someone will help you get
connected. We host other free training for the rest of the day.

If you can send and receive email, but have a technical question, please
email [email protected] with full details.

Our office hours are 10 � 4:30 on weekdays and we are located on the
second floor of 411 Dunsmuir Street in Downtown Vancouver at Homer.

Technical problems at VCN – Message:
(can use the vacation message for this)
—————————————–
This is the Vancouver Community Network Helpdesk. We are currently
experiencing a technical problem and trying to resolve it as soon as
possible. You may find an update at vcn.bc.ca

If you have an unrelated technical issue, please leave a message with
your name, your email address and your phone number plus a clear
description of the problem you are having.

Asterisk

What do the microfilters do?

Simply put, the microfilters filter out the ADSL signal from the telephone cable bandwidth.

NetVoice.ca (authorized asterisk dealer in VAN, BC)
X100P – $145.95 (i assume $CDN)
no price for TDM400P
can be picked up or shipped locally in vancouver, rates depend on delivery time.

Telco new clippings
CISC – Network Interconnection Group – VoIP

AT&T Unveils Major Voice over Internet Initiative: Will Expand Business and Launch Consumer Offers in 2004

Sheridan Centre Campus Capitalizes on VoIP

TODO LIST
– investigate QofS configuration
– failover Asterisk servers
– configuration with Wildcard h/w (when they arrive;)
– firewall/nat test with offsite asterisk server
– robust sip phones (soft/hard phones, etc)
– bandwidth of audio encoding (ulaw,alaw,gsm,etc)
– investigate video conferencing

TEST
– dial into 3811 line and pickup on fxs device or sip phone
– dial out using fxs device and sip phones.
– route phone call to another * server using IAX2
– dial 604 number
– dial out 778 number
– rollover dialout out using 3810 first, then 3811.

ZAPTEL
Eliminate echo in Zaptel hardware

LOW PRIORITY
– get music on hold to work

www.asterisk.org
www.digium.com
www.voip-info.org
Asterisk function reference

Lastest Asterisk handbook.pdf, 71 pages, edited 3/30/03 at www.asterisk.org

Asterisk administration
Asterisk security: Security in the PBX
Asterisk rollout tips: Tips on how to move from testing to practical rollout.
Asterisk at large: Tips for large installations (SIP proxy, load balancing)
Asterisk QoS: How Asterisk supports QoS networking
Asterisk billing support
Asterisk debugging: How to diagnose and isolate a bug in Asterisk
Asterisk password files: Where can you find users and passwords in Asterisk configuration files?

Q. I’m using X100P and I have random call hangups. What can I do ?

A. If you have busydetect=yes in zapata.conf then this is propably causing the problem. You might want to try to add busycount=5 or experiment a little bit with a busycount value. As a last resort you may just change busydetect to no: busydetect=no. Then asterisk won’t try to detect the hangup on incoming calls. Notice that if “Loopstart with Remote Disconnection Supervision” (Kewlstart) is working for you than you don’t need busydetect=yes at all. You can know if your current config is set to Kewlstart if you have a line fxsks=channel_no in zaptel.conf and signalling=fxs_ks in zapata.conf.

Configuration for X100P and TDM with 2 modules.

File: /etc/zaptel.conf

fxsks=1
fxoks=2-3

File: /etc/asterisk/zapata.conf

signalling=fxs_ks
context=incoming
channel => 1

signalling=fxo_ks
context=internal
channel => 2-3

File: /etc/asterisk/extensions.conf

[incoming]
exten => s,1,Dial,Zap/2

[internal]
exten => 34,1,Dial,Zap/2
exten => 823,1,Dial,Zap/3
exten => _9X.,1,Dial,Zap/1/${EXTEN}

For the TDM400P, when you load the module they LED’s will come on green. If the module is not loaded they won’t be on at all. They do not change if a phone is plugged in or not.

e) load the apropriate modules
> modprobe zaptel
> modprobe wcfxo *
> modprobe wcusb
> ztcfg -vv **
* Note that you might have errors after “modprobe wcfxo” because in the file /etc/modules.conf there are lines like that: post-install wcfxo /sbin/ztcfg These lines load zaptel configuration program right after every “modprobe driver” command. So if you configured more than one device (X100 and S100U) you’re going to have error message after loading “modprobe wcfxo”. That’s normal.

** If you have errors after you executed all four lines then it’s propable that your system loaded “audio” module for S100U. This module is a USB sound card module and you have to unload it by executing “rmmod audio”. After that execute one more time “ztcfg -vv” to be sure that everything is OK.

**2 The problem may be that you don’t have a USB controller support turned on on your motherboard or USB support is not properly configured. Check if you have any entry of USB controller in /proc/pci system file. Also check if the USB controller driver is loaded in the kernel (lsmod). You should have one of these drivers loaded: usb-uhci,uhci,ohci. If you don’t have it loaded you may try to load it using modprobe command, eg:
>modprobe usb-uhci
After the proper module is loaded when you plug in/out the S100U you should see some messages poping up on the console. If no messages pop up then remove the driver and try another one, eg: >rmmod usb-uhci; modprobe uhci
If that doesn’t work you propably need to compile your own kernel with USB support or download a diffrent linux distribution.

Note also that if you “make configs” in the zaptel sources than there will be installed boot-up script to handle modprobing drivers for you.