Local channel in asterisk is usually use to connect two or more call legs. It is usually done via Manager API, AGI or thru a call file dumped on /var/spool/asterisk/outgoing/
If you're going to call Local channel and want to monitor its call durations use the '/n' flag.
Here it is
Local/extension@context[/n]
Here is an example, a snippet of a script
fputs($socket, "Channel: Local/1$number@wakeout/n\r\n");
fputs($socket, "Context: wakeout\r\n");
fputs($socket, "Exten: waketest\r\n");
fputs($socket, "Priority: 1\r\n");
This is important most especially for billing purposes.
Hope you find this helpful. Thanks, CHeers and God Bless!!!
You may not speak.... But the heart and mind from within say something...... It can't be hidden... it will eventually show itself from the dawn ...
Thursday, January 29, 2009
Tuesday, January 27, 2009
Resolve False Hangup Detection on TDM400 on Asterisk
One of the issue I have encountered on digium card specifically TDM is the hangup detection. Some indications that you have this problem are: 1.) Random hangups 2.) Incoming calls still get through even if the outside caller has already hangup. Here are the possible solutions that can be done with it.
Set the following entries on your chan_dahdi.conf (that is if it is dahdi if not it is zapata.conf)
; first is the polarity switching
; most of the countries supports polarity reversal whenever answer or hangup happens
hanguponpolarityswitch = yes
answeronpolarityswitch = yes
;detect busy
busydetect = yes
;count the busy tones
busycount = 6
;set call progess works in mine
callprogress = yes
; set progress zone
progzone=ph ; in my case it's Philippines
After that you have to restart Asterisk for the changes to take effect. Then test the result.
I do hope you find these helpful. Thanks, Cheers and God Bless!!!!
Set the following entries on your chan_dahdi.conf (that is if it is dahdi if not it is zapata.conf)
; first is the polarity switching
; most of the countries supports polarity reversal whenever answer or hangup happens
hanguponpolarityswitch = yes
answeronpolarityswitch = yes
;detect busy
busydetect = yes
;count the busy tones
busycount = 6
;set call progess works in mine
callprogress = yes
; set progress zone
progzone=ph ; in my case it's Philippines
After that you have to restart Asterisk for the changes to take effect. Then test the result.
I do hope you find these helpful. Thanks, Cheers and God Bless!!!!
Saturday, January 24, 2009
Basics Sometimes are forgotten (Fixing few Windows issue)
I was really upset when I found my workstation not booting up. I just learned that my workstation got a virus. It was infected when I plug my USB drive. The worst is I don't have any anti-virus on my workstation. By the way the workstation that I have at the office is Windows based. Then I don't have any idea what to do next since my workstation does not resume or load the login window. A co-worker of mine told me of this basics. He told me that I can load back or boot my windows workstation on the last working configuration. Hmmmm I didn't know that. So here was what he suggested me to do.
1. Reboot / reset the windows machine
2. Upon boot press repeatedly the F8 to go to the advance windows menu configuration
3. Select "Last Working Configuration"
4. Then you're done...
But if ever you have to repair the windows OS then you have to use an installation CD to fix your problem.
1. Reset your machine
2. Upon booting press repeatedly the delete button to goto the BIOS settings
3. Select to boot first on the CD-ROM
4. Then there you go ...
Hope you find this helpful. Cheers and God Bless!!!!
1. Reboot / reset the windows machine
2. Upon boot press repeatedly the F8 to go to the advance windows menu configuration
3. Select "Last Working Configuration"
4. Then you're done...
But if ever you have to repair the windows OS then you have to use an installation CD to fix your problem.
1. Reset your machine
2. Upon booting press repeatedly the delete button to goto the BIOS settings
3. Select to boot first on the CD-ROM
4. Then there you go ...
Hope you find this helpful. Cheers and God Bless!!!!
Protecting Your Linux Systems
ALthough Linux is said to be a very secured OS. It is still highly recommended to install applications that will enhance its security and integrity. There are many kinds of threats out there that could really trip up a system. To name few are virus, rootkits, brute force attack and etc.
Here are some softwares that you can install on your Linux system and few of them are must to have.
- Netfilter's IPTables (firewall) ; of course you should enable it and set your rules
- fail2ban ; need this if ever there are ports / services that will be openned to the public say ssh
- chkrootkit ; this one is like a check up of the Linux files integrity
- clamav (optional) - this one is an anti virus but actually Linux sometimes does not require it
Ok those are just few that I know you can have on your system.
Hope you find this brief discussion helpful. Cheers and God Bless!!!
Here are some softwares that you can install on your Linux system and few of them are must to have.
- Netfilter's IPTables (firewall) ; of course you should enable it and set your rules
- fail2ban ; need this if ever there are ports / services that will be openned to the public say ssh
- chkrootkit ; this one is like a check up of the Linux files integrity
- clamav (optional) - this one is an anti virus but actually Linux sometimes does not require it
Ok those are just few that I know you can have on your system.
Hope you find this brief discussion helpful. Cheers and God Bless!!!
Friday, January 23, 2009
Asterisk DTMF Issue Fixed
One of the issues that is known with Asterisk is the reliability on how it handles DTMF. By the way what is DTMF. DTMF in layman's term is touch tone. This are the digits being dialed. We usually encounter this when we call a customer service where we're asked to dial a certain option. Say "Press 1 for sales .....".
One problem that I encountered on this was how poorly the Asterisk server accepts DTMF or send DTMF. Actually this is not an Asterisk issue but the way how the Asterisk is configured.
Is there a resolution to it? Well, there is.
Here's are some notes and how.
There are 4 modes where asterisk can handle DTMF. We have rfc2833, info, inband and auto. Among these modes, based on majority suggestions out there, it is recommended to use RFC2833.RFC2833 is said to work perfectly with asterisk. By the way RFC2833 is an out-of-band DTMF mode.
To set Asterisk to use RFC2833 then set on the configuration files (sip.conf, iax.conf and chan_dahdi (I am not sure here...)) and look for this option.
dtmfmode=(mode)
Set it to:
dtmfmode = rfc2833
rfc2833compensate = yes
relaxdmtf = no ; should be no because setting it to yes cause talkoff
then reload the module say 'sip reload'
Another suggestion is to use:
dtmfmode=auto
Here Asterisk will use RFC2833 first as its default way of relaying DMTF. If the remote side does not suppor it, then it will switch to Inband mode. But a note on this. If you plan to use this mode, make sure that you are only using ulaw codec as the Inband mode is very problematic on non ulaw codec.
Personally I recommend just using the RFC2833 as your mode for DTMF handling because it is proven to work perfectly and reliably on Asterisk. It is your choice to use auto also.
Hope this discussion will be helpful. Cheers and God Bless!!!!
One problem that I encountered on this was how poorly the Asterisk server accepts DTMF or send DTMF. Actually this is not an Asterisk issue but the way how the Asterisk is configured.
Is there a resolution to it? Well, there is.
Here's are some notes and how.
There are 4 modes where asterisk can handle DTMF. We have rfc2833, info, inband and auto. Among these modes, based on majority suggestions out there, it is recommended to use RFC2833.RFC2833 is said to work perfectly with asterisk. By the way RFC2833 is an out-of-band DTMF mode.
To set Asterisk to use RFC2833 then set on the configuration files (sip.conf, iax.conf and chan_dahdi (I am not sure here...)) and look for this option.
dtmfmode=(mode)
Set it to:
dtmfmode = rfc2833
rfc2833compensate = yes
relaxdmtf = no ; should be no because setting it to yes cause talkoff
then reload the module say 'sip reload'
Another suggestion is to use:
dtmfmode=auto
Here Asterisk will use RFC2833 first as its default way of relaying DMTF. If the remote side does not suppor it, then it will switch to Inband mode. But a note on this. If you plan to use this mode, make sure that you are only using ulaw codec as the Inband mode is very problematic on non ulaw codec.
Personally I recommend just using the RFC2833 as your mode for DTMF handling because it is proven to work perfectly and reliably on Asterisk. It is your choice to use auto also.
Hope this discussion will be helpful. Cheers and God Bless!!!!
Tuesday, January 20, 2009
PHP Native Session Handling
#native php session handling
// initializes session handling in php
session_start();
// assign and set session variables
$_SESSION['varname'] = 'value';
// unset a certain variable
unset($_SESSION['varname']);
// free all session variables
session_unset();
// terminate or kill session handling
session_destroy();
// initializes session handling in php
session_start();
// assign and set session variables
$_SESSION['varname'] = 'value';
// unset a certain variable
unset($_SESSION['varname']);
// free all session variables
session_unset();
// terminate or kill session handling
session_destroy();
Tuesday, January 13, 2009
Asterisk Installation
Asterisk is known to be the leading open source IP PBX. It has been the best choice alternative to expensive and proprietary
type of PBX server. What's nice about Asterisk is that it is open source and it is free!!! When we say open source this
software has been made by collaborating ideas of different developers around the globe. So expect the cool stuff that can be
done with it. The other nice thing about it, is that it is customizable, flexible and cross platform.
Asterisk can be obtained from various sources. You can have it in a installable CD (ISO) or you could have it from other
communities out there who have developed friendly UI where you could tweak the server easily. If I were to ask I would prefer
to have it from source. Why? Cause templated Asterisk though user friendly can't be extended the way you wish it.
So let us have the Asterisk (raw) and install it on Linux (preferably CentOS).
Before you can compile Asterisk you need the following stuffs on Linux.
Linux Requirements
GCC 3.x
ncurses-devel
libtermcap-devel
Kernel Development Headers
Kernel Development Headers (SMP)
GCC C++ 3.x
bison
OpenSSL (optional)
newt-devel (optional)
zlib-devel (optional)
libtool (optional; recommended)
GNU make (version 3.80 or higher)
libnewt
Here is how we can have them
Install command
yum install -y gcc
yum install -y ncurses-devel
yum install -y libtermcap-devel
yum install -y kernel-devel
yum install -y kernel-smp-devel
yum install -y gcc-c++
yum install -y bison
yum install -y openssl-devel
yum install -y newt-devel
yum install -y zlib-devel
yum install -y libtool
yum install -y make
yum install -y libnewt
Once done we can get the sources from asterisk.org using wget.
# wget http://downloads.digium.com/pub/libpri/releases/libpri(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/dahdi-linux(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/dahdi-tools(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/asterisk(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/asterisk-addons(version)tar.gz
then extract each of the packages
# tar xvzf(packagename)
then compile each packages
for libri and dahdi-linux
# make
# make install
for dahdi-tools
# ./configure
# make
# make install
# make config
for asterisk
# ./configure
# make menuselect ;this is optional but when run just save the default settings, in my case I used to issue it to check out the different options available
# make
# make install
# make samples
# make config
for asterisk-addons (this is important if you want to have some applications like DB, WakeUp Call, streaming audio/video)
# ./configure
# make
# make install
# make samples
To start asterisk the first time (for debugging purposes)
/usr/sbin/asterisk -vvvvgc
If you did not receive any errors stop asterisk and then start asterisk the normal way
/sbin/service asterisk start
to enter the asterisk console issue this command
for root
asterisk -r
for non-root
/usr/sbin/asterisk -r
Now you have a running Asterisk IP PBX
Note: If you want to recompile asterisk say you want to upgrade then recompile asterisk-addons after that as well because sometimes a recompiled asterisk will not load the asterisk-addons module.
BTW there are also other addons / extensions available out there that works with Asterisk like the app_conference (an alternative for MeetMe, capable for doing video conferencing), app_mp4 from sip.fontventa (for recording mp4 video)
Hope you find these helpful. Thanks, Cheers and God Bless!!!!
type of PBX server. What's nice about Asterisk is that it is open source and it is free!!! When we say open source this
software has been made by collaborating ideas of different developers around the globe. So expect the cool stuff that can be
done with it. The other nice thing about it, is that it is customizable, flexible and cross platform.
Asterisk can be obtained from various sources. You can have it in a installable CD (ISO) or you could have it from other
communities out there who have developed friendly UI where you could tweak the server easily. If I were to ask I would prefer
to have it from source. Why? Cause templated Asterisk though user friendly can't be extended the way you wish it.
So let us have the Asterisk (raw) and install it on Linux (preferably CentOS).
Before you can compile Asterisk you need the following stuffs on Linux.
Linux Requirements
GCC 3.x
ncurses-devel
libtermcap-devel
Kernel Development Headers
Kernel Development Headers (SMP)
GCC C++ 3.x
bison
OpenSSL (optional)
newt-devel (optional)
zlib-devel (optional)
libtool (optional; recommended)
GNU make (version 3.80 or higher)
libnewt
Here is how we can have them
Install command
yum install -y gcc
yum install -y ncurses-devel
yum install -y libtermcap-devel
yum install -y kernel-devel
yum install -y kernel-smp-devel
yum install -y gcc-c++
yum install -y bison
yum install -y openssl-devel
yum install -y newt-devel
yum install -y zlib-devel
yum install -y libtool
yum install -y make
yum install -y libnewt
Once done we can get the sources from asterisk.org using wget.
# wget http://downloads.digium.com/pub/libpri/releases/libpri(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/dahdi-linux(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/dahdi-tools(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/asterisk(version)tar.gz
# wget http://downloads.digium.com/pub/libpri/releases/asterisk-addons(version)tar.gz
then extract each of the packages
# tar xvzf
then compile each packages
for libri and dahdi-linux
# make
# make install
for dahdi-tools
# ./configure
# make
# make install
# make config
for asterisk
# ./configure
# make menuselect ;this is optional but when run just save the default settings, in my case I used to issue it to check out the different options available
# make
# make install
# make samples
# make config
for asterisk-addons (this is important if you want to have some applications like DB, WakeUp Call, streaming audio/video)
# ./configure
# make install
# make samples
To start asterisk the first time (for debugging purposes)
/usr/sbin/asterisk -vvvvgc
If you did not receive any errors stop asterisk and then start asterisk the normal way
/sbin/service asterisk start
to enter the asterisk console issue this command
for root
asterisk -r
for non-root
/usr/sbin/asterisk -r
Now you have a running Asterisk IP PBX
Note: If you want to recompile asterisk say you want to upgrade then recompile asterisk-addons after that as well because sometimes a recompiled asterisk will not load the asterisk-addons module.
BTW there are also other addons / extensions available out there that works with Asterisk like the app_conference (an alternative for MeetMe, capable for doing video conferencing), app_mp4 from sip.fontventa (for recording mp4 video)
Hope you find these helpful. Thanks, Cheers and God Bless!!!!
Subscribe to:
Posts (Atom)