Category Archives: Virtualisasi

INTEL IPP CODEC G729 & G729 ON ELASTIX 2.5 64 BIT


[root@localhost]# vim /etc/redhat-release

Red Hat Enterprise Linux Server release 5.10
[root@localhost]# tar -zxvf l_ipp_7.0.6.293_intel64.tgz -C /usr/src/

[root@localhost]# cd /usr/src/l_ipp_7.0.6.293_intel64/

./install.sh

accept

1. I want to activate my product using a serial number [default]
2. I want to evaluate my product or activate later
3. I want to activate either remotely, or by using a license file, or by using a
license manager

h. Help
b. Back to the previous menu
q. Quit
——————————————————————————–
Please type a selection or press “Enter” to accept default choice [1]:
Note: Press “Enter” key to back to the previous menu.
Please type your serial number (the format is XXXX-XXXXXXXX): SERIAL_NUMBER

Step no: 4 of 6 | Options
——————————————————————————–
You are now ready to begin installation. You can use all default installation
settings by simply choosing the “Start installation Now” option or you can
customize these settings by selecting any of the change options given below
first. You can view a summary of the settings by selecting
“Show pre-install summary”.
——————————————————————————–
1. Start installation Now

2. Change install directory [ /opt/intel/composer_xe_2011_sp1.9.293 ]
3. Show pre-install summary

h. Help
b. Back to the previous menu
q. Quit
——————————————————————————–
Please type a selection or press “Enter” to accept default choice [1]:

ENTER
Step no: 6 of 6 | Complete
——————————————————————————–
Thank you for installing and for using the
Intel(R) Integrated Performance Primitives 7.0 Update 6 for Linux*.

Support services start from the time you install or activate your product, so
please create your support account now in order to take full advantage of your
product purchase. Your Subscription Service support account provides access to
free product updates interactive issue management, technical support, sample
code, and documentation.

To create your support account, please visit the Subscription Services web site
https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?clientsn=XXXXXXX
——————————————————————————–
q. Quit [default]
——————————————————————————–
Please type a selection or press “Enter” to accept default choice [q]:
[root@localhost l_ipp_7.0.6.293_intel64]#

[root@localhost src]# wget http://asterisk.hosting.lv/src/asterisk-g72x-1.3.tar.bz2

[root@localhost src]# tar xvjf asterisk-g72x-1.3.tar.bz2 -C /usr/src/

[root@localhost src]# cd asterisk-g72x-1.3

[root@localhost asterisk-g72x-1.3]# ./autogen.sh
[root@localhost asterisk-g72x-1.3]# ./autogen.sh
aclocal:configure.ac:11: warning: macro `AM_PROG_LIBTOOL’ not found in library
configure.ac:10: error: possibly undefined macro: AC_DISABLE_STATIC
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:11: error: possibly undefined macro: AM_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1

[root@localhost asterisk-g72x-1.3]# yum remove libtool

[root@localhost asterisk-g72x-1.3]# cd /etc/yum.repos.d/

[root@localhost asterisk-g72x-1.3]# rm -rf REPO_ELASTIX

[root@localhost asterisk-g72x-1.3]# yum install libtool libtool-*

[root@localhost asterisk-g72x-1.3]# ./autogen.sh
[root@localhost asterisk-g72x-1.3]# ./configure –with-asterisk11 –with-ipp=/opt/intel/ipp –enable-opteron-sse3 && make && make install

DIGIT MANIPULATION WELLGATE FXS


digit_manipulation_wellgate01 digit_manipulation_wellgate02

RSYSLOG WELLGATE CDR


#$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
#$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides –MARK– message capability

# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
#### GLOBAL DIRECTIVES ####

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

EXAMPLE CDR

Nov 13 11:38:44 2014-11-13 12: 39:13 CDR OUT Src :8023 Dst :922222081287264002 CallID 80be4168-cd0010ac-17bc-45026-7f-29658e35-7f START:2014/11/13 12:38:50 ANSWER:2014/11/13 12:39:03 END:2014/11/13 12:39:13 DURATION:023 BillSec:010 DISPOSITION:FINISHED

cdr_wellgate

:fromhost-ip,startswith,”172.16.0.205″ /var/log/remote.log

EVENT ASTERISK MANAGER


npm install asterisk-manager

/home/node_modules/asterisk-manager/lib/test.js

test.js

var ami = new require(‘asterisk-manager’)(‘5038′,’192.168.0.105′,’username’,’password’, true);

// Listen for any/all AMI events.
ami.on(‘managerevent’, function(evt) {
console.log(‘EVENT ::’, evt);

});

// Listen for specific AMI events. A list of event names can be found at
// https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+AMI+Events
ami.on(‘hangup’, function(evt) {
console.log(‘HANGUP ::’, evt);
});
ami.on(‘confbridgejoin’, function(evt) {
console.log(‘CONFBRIDGEJOIN ::’, evt);
});

ami.on(‘close’, function(e) {
console.log(‘CLOSE ::’, e);
});
ami.on(‘disconnect’, function(e) {
console.log(‘DISCONNECT ::’, e);
});
ami.on(‘connect’, function(e) {
console.log(‘CONNECT ::’, e);
});

ami.action({
‘action’:’originate’,
‘channel’:’SIP/4001′,
‘context’:’default’,
‘exten’:1234,
‘priority’:1,
‘variables’:{
‘name1′:’value1’,
‘name2′:’value2’
}
}, function(err, res) {});

ASTERISK CEL 1.8


yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel

make menuselect -> CEL -> cel_odbc

make && make install && make config

service asterisk restart

ecentrix*CLI> module show like odbc
Module Description Use Count
res_odbc.so ODBC resource 0
res_config_odbc.so Realtime ODBC configuration 0
cdr_odbc.so ODBC CDR Backend 0
cdr_adaptive_odbc.so Adaptive ODBC CDR backend 0
func_odbc.so ODBC lookups 0
cel_odbc.so ODBC CEL backend 0
6 modules loaded

Create database “asteriskcdrdb”

CREATE TABLE IF NOT EXISTS `cel` (
  `id` int(11) NOT NULL auto_increment,
  `eventtype` varchar(30) NOT NULL,
  `eventtime` datetime NOT NULL,
  `cid_name` varchar(80) NOT NULL,
  `cid_num` varchar(80) NOT NULL,
  `cid_ani` varchar(80) NOT NULL,
  `cid_rdnis` varchar(80) NOT NULL,
  `cid_dnid` varchar(80) NOT NULL,
  `exten` varchar(80) NOT NULL,
  `context` varchar(80) NOT NULL,
  `channame` varchar(80) NOT NULL,
  `src` varchar(80) NOT NULL,
  `dst` varchar(80) NOT NULL,
  `channel` varchar(80) NOT NULL,
  `dstchannel` varchar(80) NOT NULL,
  `appname` varchar(80) NOT NULL,
  `appdata` varchar(80) NOT NULL,
  `amaflags` int(11) NOT NULL,
  `accountcode` varchar(20) NOT NULL,
  `uniqueid` varchar(32) NOT NULL,
  `linkedid` varchar(32) NOT NULL,
  `peer` varchar(80) NOT NULL,
  `userdeftype` varchar(255) NOT NULL,
  `eventextra` varchar(255) NOT NULL,
  `userfield` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `uniqueid_index` (`uniqueid`),
  KEY `linkedid_index` (`linkedid`)
);

vim /etc/odbc.ini

[mysql-odbc]
Description = ODBC to Mysql
Driver = MySQL
Database = asteriskcdrdb
Server = 127.0.0.1
UserName = userdb
Password = passdb
Socket = /var/lib/mysql/mysql.sock
option = 3

vim /etc/odbcinst.ini

[MySQL]
Description = ODBC for MySQL
Driver64 = /usr/lib64/libmyodbc5.so #--> 64 bit os
Setup64 = /usr/lib64/libodbcmyS.so # ---> 64 bit os
FileUsage = 1


[root@ecentrix asterisk-1.8.26.1]# cat /etc/asterisk/cel.conf | egrep 'enable|apps|events' 
enable=yes
apps=all
events=ALL
dateformat = %d-%m-%Y %T



[root@ecentrix asterisk-1.8.26.1]# cat /etc/asterisk/res_odbc.conf | egrep 'enabled|dsn|username|password|pooling|limit|pre-connect'
enabled => yes
dsn => mysql-odbc
username => dbuser
password => dbpass
pre-connect => yes
limit => 1
enabled => no


[root@ecentrix asterisk-1.8.26.1]# cat  /etc/asterisk/cel_odbc.conf
[cel]
connection=asterisk
table=cel
username=dbuser
password=dbpass
loguniqueid=yes

ecentrix*CLI> cel show status
CEL Logging: Enabled
CEL Tracking Event: ALL
CEL Tracking Event: CHAN_START
CEL Tracking Event: CHAN_END
CEL Tracking Event: HANGUP
CEL Tracking Event: ANSWER
CEL Tracking Event: APP_START
CEL Tracking Event: APP_END
CEL Tracking Event: BRIDGE_START
CEL Tracking Event: BRIDGE_END
CEL Tracking Event: CONF_START
CEL Tracking Event: CONF_END
CEL Tracking Event: PARK_START
CEL Tracking Event: PARK_END
CEL Tracking Event: BLINDTRANSFER
CEL Tracking Event: ATTENDEDTRANSFER
CEL Tracking Event: TRANSFER
CEL Tracking Event: HOOKFLASH
CEL Tracking Event: 3WAY_START
CEL Tracking Event: 3WAY_END
CEL Tracking Event: CONF_ENTER
CEL Tracking Event: CONF_EXIT
CEL Tracking Event: USER_DEFINED
CEL Tracking Event: LINKEDID_END
CEL Tracking Event: BRIDGE_UPDATE
CEL Tracking Event: PICKUP
CEL Tracking Event: FORWARD
CEL Tracking Application: all
CEL Event Subscriber: ODBC CEL backend
CEL Event Subscriber: CEL Custom CSV Logging
ecentrix*CLI> odbc show

ODBC DSN Settings
-----------------

 Name: asterisk
 DSN: mysql-odbc
 Last connection attempt: 1970-01-01 07:00:00
 Pooled: No
 Connected: Yes

[root@ecentrix asterisk-1.8.26.1]# odbcinst -s -q
[mysql-odbc]


[root@ecentrix asterisk-1.8.26.1]# odbcinst -j
unixODBC 2.2.14
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

mysql> select * from cel;
+----+--------------+---------------------+----------+---------+---------+-----------+----------+-------+------------------+-------------------+-----+-----+---------+------------+---------+---------+----------+-------------+--------------+--------------+------+-------------+------------+-----------+
| id | eventtype | eventtime | cid_name | cid_num | cid_ani | cid_rdnis | cid_dnid | exten | context | channame | src | dst | channel | dstchannel | appname | appdata | amaflags | accountcode | uniqueid | linkedid | peer | userdeftype | eventextra | userfield |
+----+--------------+---------------------+----------+---------+---------+-----------+----------+-------+------------------+-------------------+-----+-----+---------+------------+---------+---------+----------+-------------+--------------+--------------+------+-------------+------------+-----------+
| 1 | CHAN_START | 2014-10-21 04:22:48 | 4001 | 4001 | | | | 3000 | from-agents | SIP/4001-00000000 | | | | | | | 3 | | 1413840168.0 | 1413840168.0 | | | | |
| 2 | ANSWER | 2014-10-21 04:22:48 | 4001 | 4001 | 4001 | | 3000 | 3000 | ecentrix-inbound | SIP/4001-00000000 | | | | | Answer | | 3 | | 1413840168.0 | 1413840168.0 | | | | |
| 3 | HANGUP | 2014-10-21 04:22:48 | 4001 | 4001 | 4001 | | 3000 | 3000 | ecentrix-inbound | SIP/4001-00000000 | | | | | | | 3 | | 1413840168.0 | 1413840168.0 | | | | |
| 4 | CHAN_END | 2014-10-21 04:22:48 | 4001 | 4001 | 4001 | | 3000 | 3000 | ecentrix-inbound | SIP/4001-00000000 | | | | | | | 3 | | 1413840168.0 | 1413840168.0 | | | | |
| 5 | LINKEDID_END | 2014-10-21 04:22:48 | 4001 | 4001 | 4001 | | 3000 | 3000 | ecentrix-inbound | SIP/4001-00000000 | | | | | | | 3 | | 1413840168.0 | 1413840168.0 | | | | |
+----+--------------+---------------------+----------+---------+---------+-----------+----------+-------+------------------+-------------------+-----+-----+---------+------------+---------+---------+----------+-------------+--------------+--------------+------+-------------+------------+-----------+
5 rows in set (0.00 sec)




Protected: FREESWITCH AND BILLING


This content is password protected. To view it please enter your password below:

agispeedy (The Agispeedy is an AGI Application Server implemention in asterisk and written by Pure PHP)


agispeedy

Donwload “agispeedy.jpg” rename to agispeedy.tar.gz then extract:)

/etc/init.d/agispeedy start

extensions.conf

[from-agents]

exten => 8888,1,Set(VAR_INPUT=1000)
exten => 8888,n,AGI(agi://127.0.0.1/demo,digits=12)
exten => 8888,n,Hangup()

[root@server66 ~]# php /agispeedy/bin/agispeedy.php –verbose

 

agi_demo.php

answer();
$agi->verbose(print_r($agi->param));

_number($agi,$agi->param);
_get_var($agi);
_input_digit($agi);

$agi->hangup();
return(true);
}

function _number($agi,$prm){
$agi->say_number($agi->param[‘digits’], $escape_digits=”);
}

function _get_var($agi){
$_gv=$agi->get_variable(‘VAR_INPUT’,$getvalue=TRUE);
$agi->verbose(“get_variable = “. $_gv);

}

function _input_digit($agi){
$_input=$agi->get_data(‘vm-tocancel’,$timeout=-1,$max_digits=2);
$agi->verbose(“_input_digit = “. $_input[‘result’]);

}
?>

 

agispeedy

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: