Archive

Author Archive

Dynamic Agent Login in AsteriskNOW

July 21st, 2010

This blog explains how an agent can login to a queue directly through an extension. In asterisk’s terms an agent is human and an extension is device. Here an agent will be able to login into the queue through an extension by dialing a queue login number and you do not need to make any configurations in agents.conf or queues.conf.  For this setup to work properly, you need to have the correct dialplans in corresponding  extension files.

In the case of asteriskNOW, extension_additional.conf contains dialplans to handle  queue login.

[ext-queues]
exten => 5000*,1,Macro(agent-add,5000,)
exten => 5000**,1,Macro(agent-del,5000,5000)

If [macro-agent-add] and [macro-agent-del] contexts are already present in extensions_additional.conf you need to put the dialplans for these contexts in /etc/asterisk/extensions_override_freepbx.conf otherwise you can add the dialplans in /etc/asterisk/extensions_custom.conf.

[macro-agent-add]
include => macro-agent-add-custom
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n,Set(CALLBACKNUM=${AMPUSER})
exten => s,n,AddQueueMember(${ARG1},Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loginok&with&extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Hangup
exten => s,n,MacroExit()
exten => s,n(invalid),Playback(pbx-invalid)
exten => s,n,Goto(a3)

; end of [macro-agent-add]
[macro-agent-del]
include => macro-agent-del-custom
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n,Set(CALLBACKNUM=${AMPUSER})
exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
exten => s,n,RemoveQueueMember(${ARG1},Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,UserEvent(RefreshQueue)
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loggedoff&with&extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Hangup
; end of [macro-agent-del]

In this dialplan 5000 is the queue number. You can use any queue number instead of it. To login to queue dial 5000* from your phone (either a softphone like xlite or a hard phone like Linksys) and you will hear a login confirmation and to logout from the queue you need to dial 5000** as per the dial plan. The advantage of this method is that an agent can do a login or logout by just dialing the corresponding number. Once logged in we can check current members in the queue using the command.

From shell
#asterisk -rx "queue show 5000"   (5000 is the queue number)
From asterisk CLI
> queue show 5000
VN:F [1.9.1_1087]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Tino Thomas linux , , , , , , ,

How to customize call recording location in asteriskNOW

July 20th, 2010

Customize call recording location in asteriskNow.

By default AsteriskNOW saves call recordings under the directory /var/spool/asterisk/monitor. This way of call recording has got some disadvantages since number of files can grow beyond a limit . You will find it difficult to recognize call recordings related to a particular extension. A solution to this issue is to customize the call recording location. You need to override the dialplan for the context [macro-record-enable] present in /etc/asterisk/extensions_additional.conf. To override these dialplans you need to add new dialplan in a file called /etc/asterisk/extensions_override_freepbx.conf.  Following is the default dialplan for the context [macro-record-enable] present in /etc/asterisk/extensions_additional.conf.


[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = ""]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),AGI(recordingcheck,${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)},${UNIQUEID})
exten => s,n,MacroExit()
exten => s,1+998(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST})
; end of [macro-record-enable]

You need to add the following dialplan in /etc/asterisk/extensions_override_freepbx.conf, which will override the above dialplan to customize the call recording location.


[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = ""]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),AGI(recordingcheck,${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)},${UNIQUEID})
exten => s,n,MacroExit()
exten => s,n(record),System(/bin/mkdir -p /var/spool/asterisk/monitor/freepbx/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},
,%m)}/${STRFTIME(${EPOCH},,%d)}/${ARG1}/${UNIQUEID})
exten => s,n,MixMonitor(/var/spool/asterisk/monitor/freepbx/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},,%m)}/${STRFTIME($
{EPOCH},,%d)}/${ARG1}/${UNIQUEID}/${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST})

The changes made are

exten => s,n(record),System(/bin/mkdir -p /var/spool/asterisk/monitor/freepbx/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},
,%m)}/${STRFTIME(${EPOCH},,%d)}/${ARG1}/${UNIQUEID})

Here we are using ‘System’ command to create directories during the call recording. Inside the system command we can execute the unix shell commands. Here we used ‘mkdir’ command to create directories followed by a number of variables in asterisk. Here ‘STRFTIME’ used to get the year, month & date . ${ARG1} used to get the asterisk user extension ,who is participating in that call ;${UNIQUEID} to get the unique id of that call. UNIQUEID is assigned by asterisk and it is the unix time of orgination of that call.

<pre>exten => s,n,MixMonitor(/var/spool/asterisk/monitor/freepbx/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},,%m)}/${STRFTIME($
{EPOCH},,%d)}/${ARG1}/${UNIQUEID}/${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST})</pre>

In succeeding priority we use MixMonitor command to record the conversations in that channel. The format of MixMonitor command is MixMonitor(<file>.<ext>[|<options>[|<command>]]). Here in the ‘filename’ field we will give path of created directory in the preceding line.

Once you made the above changes you need to reload the dialplan through either of the following two ways.

from shell

#asterisk -rx “dialplan reload”

from asterisk CLI

> dialplan reload

VN:F [1.9.1_1087]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Tino Thomas linux , , , , , , ,

How to install AsterCRM and integrate it with external CRM

July 19th, 2010

1) Download and unzip the source (assuming your WEB root is /var/www/html)

Get the software from


http://astercc.org/downloads
cd /var/www/html

unzip astercc-X.X.zip

mv astercc-X.X astercc

/var/www/html/astercc/astercrm                 # main directory and PHP scripts  of astercrm
/var/www/html/astercc/asterbilling              #  main directory and PHP scripts of asterbilling
/var/www/html/astercc/sql                          # sql to create database  tables
/var/www/html/astercc/script                      # astercc  daemon and some other script files
/var/www/html/astercc/index.html               #guide page
/var/www/html/astercc/astercc_full_logo.png  #logo

2) It is highly advised that the whole script directory be moved to a more secure location like /opt and out of the WEB root directory


mkdir -p /opt/asterisk/scripts/astercc
mv  /var/www/html/astercc/scripts/*  /opt/asterisk/scripts/astercc
chmod +x /opt/asterisk/scripts/astercc/*

3) Create the MySQL database and tables, asterCRM need mysql 4.1 or above

Note: here we create the database named astercc, it both used for astercrm and asterbilling, you could use whatever db name you want use your configration to replace “yourmysqluser” and “yourmysqlpasswd”


mysqladmin -uyourmysqluser  -pyourmysqlpasswd create astercc
mysql -uyourmysqluser  -pyourmysqlpasswd astercc < /var/www/html/astercc/sql/astercc.sql

4) Update /etc/asterisk/manager.conf to enable Manager connections

Note:allow asterisk on different server .Add something like this to the manager.conf file:


[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
;displayconnects = yes

;the following line could be  changed by yourself
[astercc]
secret = astercc
read = system,call,log,verbose,command,agent,user
write =  system,call,log,verbose,command,agent,user
deny=0.0.0.0/0.0.0.0
; if you want to run astercc on another  server
; use your astercc ip to replace 127.0.0.1 or add a  new line
permit=127.0.0.1/255.255.255.0

5) Modify config file

for asterCRM:
modity /var/www/html/astercc/astercrm/astercrm.conf.php to fit your configration
for asterCC:
modity /var/www/html/astercc/asterbilling/asterbilling.conf.php to fit your configration

6) Start Asterisk and daemon

There are two daemon modes you can choose, astercc mode or eventsdaemon(can be used for astercrm only) mode.

A) For astercc mode(can be used for both astercrm and asterbilling.

try start astercc:
modify /opt/asterisk/scripts/astercc/astercc.conf to fit your configuration mainly database setting and AMI setting.

run astercc for test


/opt/asterisk/scripts/astercc/astercc

if you could read like following line:


"Connecting to mysql database on  127.0.0.1:
Database connection successful.
Connecting to asterisk on 127.0.0.1 port 5038:
Asterisk socket connection successful.
Check  asterisk username & secret:
Success
Monitor Start:
...(some log message)..."

congratulations, your astercc works well, use 'ctrl + c' to exit
or else, please check your database/AMI configration in astercc.conf

Start up astercc (default settings):
modify /var/www/html/astercrm/astercrm.conf.php set eventtype to curcdr


/opt/asterisk/scripts/astercc/astercc -d

Start up astercc daemons when system startup:
Note: This option can only fit to redhat-release system. If you want astercc daemons to start automatically when you boot your machine, you need to :


cp /opt/asterisk/scripts/astercc/asterccd  /etc/rc.d/init.d
chmod 755 /etc/rc.d/init.d/asterccd
chkconfig --add asterccd

Advice: Configure your astercc restart once everyday, it’s not necessary, but it ’s good for your astercc operation. for example: you want to restart astercc at 0′clock everyday, just do the following line as root.


crontab -e
add a new  line:
0 0 * * * /etc/rc.d/init.d/asterccd restart
the first "0" figures minutes and the second "0" figures hours.

B) For eventsdaemon mode(can be used for astercrm only) try start eventsdaemon:
modify eventsdaemon.pl to fit your configuration mainly database setting and AMI setting.

/opt/asterisk/scripts/astercc/eventsdaemon.pl
if you could  read:

"Message: Authentication accepted"

congratulations,  your eventsdaemon works well
use ctrl + c to exit
or else, please check your database/AMI configration in eventsdaemon.pl

Start eventsdaemon (default settings):
modify astercrm.conf set eventtype to event


/opt/asterisk/scripts/astercc/eventsdaemon.pl -d

At some point it may be desirable to delete unwanted events from the database table. The eventsdaemon is also designed for this. please check eventsdaemon.pl for parameter “log_life” .also we provide a “watch dog”, it would help you restart eventsdaemon when it shutdown add this shell to your start-up file, for example:


echo /opt/asterisk/scripts/astercc/eventdog.sh >>  /etc/rc.d/rc.local

so that everytime your server start, eventsdaemon would be loaded

7) Set file & folder access for astercrm

chmod 777 /var/www/html/astercc/astercrm/upload
chmod 777 /var/www/html/astercc/astercrm/astercrm.conf.php

If asterisk and astercrm running in one server, you could make a soft link to astercrm web directory for listening monitor records online.
ln -s /var/spool/asterisk/monitor/ /var/www/html/astercc/astercrm/monitor
note: astercrm support listen monitors online only can be wav format file.

8 ) Web browsing

For astercc:


http://localhost/astercc

or  http://YOUR-WEB-SERVER-ADDRESS/astercc

For astercrm:


http://localhost/astercc/astercrm

or  http://YOUR-WEB-SERVER-ADDRESS/astercc/astercrm

login with admin/admin

Integration of External CRM With AsterCRM

In your astercrm, go to
Manager-> preference

If asterCRM use external CRM software, change the value of enable_external_crm to 1. When using external CRM, the default page to be displayed is specified in external_crm_default_url .Value of external_crm_url specifies, when asterCRM need to pop up, which url would recevie the event, %callerid: %calleeid: %method dialout or dialin. Save the changes made by clicking Save button.

VN:F [1.9.1_1087]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Tino Thomas linux , , , , , , ,

Email Feedback Loop (FBL)

February 20th, 2010

What is FBL

Usually when users do not want to receive any more mails from an email account they just click the “report spam button” available in their web mail or mail client. As a result of that a complaint will be raised against the ip from which this email is sent and the isp will start blocking this ip after the complaint rate increases a certain limit. So it is crucial to know the users who do not want to receive mails from us  so that we can remove them from the mailing list and mails will not be sent to these users again. A feedback loop is a mechanism whereby an ISP will let you know when one of its subscribers complains about your e-mail.

How to Sign up For Email Feedback Loop

To use this service, you should send a request for an ISP feedback loop either via email or through a web form. Most of the ips provide a web from to register their feedback loop program. The usual information you need to provide to sign up for a feedback loop are:

* IP addresses that you want to receive feedback loops for

* The list of domains you want to subscribe

* A valid abuse@ and/or postmaster@ email address on the domains you want to subscribe

* Your contact information: name, contact email and phone number

* The email address a feedback loop will be sent at

* Quantity of email messages sent daily (weekly, monthly) to the domain of the feedback look

* Type of email content you send

A confirmation email will be sent to the contact email address you specify. Once your request has been approved, Feedback Loop email will be sent to the email address listed in the “Feedback Loop Email” field.

How FBL Works

1. Sender sends a mail to the user

2. User complaints to his ISP about the message by hitting the report spam button

3. The sender  will be notified when a recipient complains about your email.

4. The sender will receive an email message saying something like “a spam complaint was registered for the IP address xxx.xxx.xxx.xxx”.

Sender’s original email message will be attached to that notification email.

Advantages of Feedback Loops

Feedback loops help you reveal unhappy subscribers, improve your email deliverability and decrease your spam complaint rate. This helps you to maintain a good reputation for the ips. Feedback loops allow you to check  deeply into your sign up process that adds user to their mailing list when one user signs up. Increased complaint rate can be caused by subscribers not realizing what they signed up for, subscribers not getting what they thought they signed up for, or a long delay between sign-up and the first mailing. So these feedback loops help the sending organization to improve the quality of their sign up process.

Different Feedback Loop Programs

Every ISP’s feedback loop is different, making the aggregate data sometimes challenging to manage. Some use a standardized format – the Abuse Reporting Format. Some send feedback in real time, others send in batches. Many send the entire offending message, others only provide the e-mail address – and still others send the body of the message but no address. For Yahoo only senders who sign their outbound emails with DomainKeys and/or DKIM are eligible to participate in their feedback loop program. AOL will only active the service after an ip ownership test.It verify that a particular domain has a right to receive abuse complaints for the ips in the submitted request. There are five possible tests to prove IP ownership. Passing any one of the five tests says “AOL, yourdomain.com has a right to receive abuse complaints on behalf of our IP.” Also different isps are providing options to modify the existing feedback loop. You may add more ips or remove existing ips through web forms. Also in any point if you do not want to use feedback loop service from an isp you may write to the postmaster department of corresponding isp for that.

Conclusion

This one-time action will help you keep a good email sender reputation and improve your email delivery rate into the recipient’s Inbox. So it is always better to have feedback loop.

VN:F [1.9.1_1087]
Rating: 8.5/10 (4 votes cast)
VN:F [1.9.1_1087]
Rating: +1 (from 1 vote)

Tino Thomas Mailservice ,

Cpanel backend files

January 5th, 2010

IMPORTANT CPANEL BACKEND FILES AND LOG FILES

/var/cpanel

accounting.log - Contains a list of accounting functions performed such as account removal and creation

cpanel.config – Tweak settings for whm can be done in this file

mainip – Main ip of the server is specified in this file

maxemail - Maximum emails per hour for a domain can be specified here The format is like the following domainname=number

Run the script /scripts/build_maxemails_config after editing this file This will create a file named after the corresponding domain name inside the directory maxemailsperdomain with the value specified in it.

Maxemailsperhour - Server wide maximum emails per hour can be set in this file. It applies to the whole domains in the server. You only need to insert the corresponding value in the file. A value of zero means unlimited.

Resellers-nameservers – This file gives you the name of the nameservers used by reseller users

resellers – This file lists the privileges of different reseller users

packages/ - This directory contains files for all the packages created under the WHM and the corresponding files will give all the details related to that package
Read more…

VN:F [1.9.1_1087]
Rating: 7.3/10 (3 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Tino Thomas linux , , , , , , ,