Re: [asterisk-users] Concurrent call monitoring

2011-10-25 Thread Sammy Govind
I wrote my own shell scripts to collect core show calls value from
asterisk and then push the filtered value to an opensource monitoring tool.
That worked perfectly well.

#!/usr/bin/perl -w
use strict;
open(LINE, 'asterisk -rx core show channels|');
my ($chans, $calls, $line)=(0,0,undef);
while ($line = LINE)
{
$calls = $1 if ($line =~ /^(\d+) active call/);
}
close(LINE);
printf $calls;


On Tue, Oct 25, 2011 at 6:40 PM, Danny Nicholas da...@debsinc.com wrote:

 The Simplest method of seeing the number of concurrent calls is service
 asterisk status.  If I understand question two,  asterisk -rx  core show
 channels verbose is probably your best bet.

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ishfaq Malik
 Sent: Tuesday, October 25, 2011 8:29 AM
 To: Asterisk Users
 Subject: [asterisk-users] Concurrent call monitoring

 Hi

 What are people using to monitor the concurrent number of calls at any
 given
 time?

 Also, is there any good way of monitoring concurrent inbound and outbound
 calls so that we can see the 2 different numbers?

 Thanks in advance

 Ish
 --
 Ishfaq Malik
 Software Developer
 PackNet Ltd

 Office:   0161 660 3062


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New
 to
 Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] OPTIONS to query endpoint capability

2011-10-25 Thread J.R. Pauley
I have been sending OPTIONS requests both programatically (my own code),
manually via SIP VERIFY PEER x and automatcially by setting verify=yes in
sip.conf. The trouble is I do not see anything except an ACK 200 come back
from endpoints and it does not contain any SDP/codec info. . My goal is to
determine audio and video codec capability in advance of a call INVITE. I
notice the Asterisk generated OPTIONS does not specify any Accept header (ie
Accept=application/sdp). I was thinking maybe that is why I don't get any
SDP coming back. My own code generated OPTIONS includes the Accept header
and still I see no SDP.

Is Anyone able to query codec capability for any endpoints? I would like to
know how you do so.

Below is excerpt from the automatic OPTIONS query I see in the sip logs from
setting verify=true. No Accept header. Does anyone believe that to be the
problem? Notice the response has content length=0 and no SDP. Any ideas
appreciated

OPTIONS sip:991@192.168.1.4:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK7f05f169

Max-Forwards: 70

From: asterisk sip:asterisk@192.168.1.2;tag=as1fd2a50c

To: sip:991@192.168.1.4:5060

Contact: sip:asterisk@192.168.1.2:5060

Call-ID: 010fdb653903a2022b99ed1d40c0b8db@192.168.1.2:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 1.8.6.0

Date: Mon, 24 Oct 2011 19:14:47 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH

Supported: replaces, timer

Content-Length: 0


--- SIP read from UDP:192.168.1.4:5060 ---

SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bK7f05f169

From: asterisk sip:asterisk@192.168.1.2;tag=as1fd2a50c

To: sip:991@192.168.1.4:5060;tag=003d3418e2fce011b081701a0413e3f3

Call-ID: 010fdb653903a2022b99ed1d40c0b8db@192.168.1.2:5060

CSeq: 102 OPTIONS

Contact: sip:991@192.168.1.4:5060

Allow: INVITE, OPTIONS, ACK, BYE, CANCEL, INFO, NOTIFY, MESSAGE, UPDATE

Server: SIPPER for PhonerLite

Content-Length: 0
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Reporting for Asterisk Call Center

2011-10-25 Thread bilal ghayyad
Dear wcselby;

Thanks a lot for your reply.

For below script, I have some questions if you can help me:

1) I am looking to have reports for the call center, so I need to determine how 
many calls in the queue, and how many agents logged and when the agent logged 
in and when logged out ... etc. But I do not see this in the fields created for 
the CDR, only what I see those fields related to the call it self. So how I can 
get this?

2) What is required from me to be done to have CDR for the call center? From 
where to be enabled? In that case, from where I can determine the fields that I 
have to add it for the cdr table in the database to be able to have cdr for the 
call center events?

3) Generally speaking, any events will be added in the cdr (those related for 
calls or call center or any other thing), how can I know the fields that I have 
to add it to be able to store in the database? Is it the only solution is to 
look for the Master file to see what the cdr is logging, and based on it I have 
to create the database?

Appreciate your kindly help.
Regards
Bilal


  Dear Tark;
 
  The asterisk version I am running is 1.8 and I can
 select mysql from
  menuselect when I am compiling.
 
  But when I googled for cdr-mysql, I discovered that I
 have to login for
  mysql and create the database and run a script to
 create this and give the
  grants. All what I found in google is related to other
 asterisk versions,
  while mine is 1.8, so the problem is how to know the
 required script to
  create the database and give the right grants to be
 used for CDR that suite
  the version I am running? From where I can get this?
 
 
 
 The following script will generate an asterisk database
 with a table named
 CDR that will work with asterisk 1.8.  Be sure to
 change 'PASSWORD' with
 whatever password you want to use.
 
 SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
 CREATE DATABASE `asterisk` DEFAULT CHARACTER SET latin1
 COLLATE
 latin1_swedish_ci;
 USE `asterisk`;
 
 CREATE TABLE IF NOT EXISTS `cdr` (
 `recid` mediumint(8) unsigned NOT NULL auto_increment
 COMMENT 'Record ID',
 `calldate` datetime NOT NULL default '-00-00
 00:00:00',
 `clid` varchar(80) NOT NULL default '',
 `src` varchar(80) NOT NULL default '',
 `dst` varchar(80) NOT NULL default '',
 `dcontext` varchar(80) NOT NULL default '',
 `channel` varchar(80) NOT NULL default '',
 `dstchannel` varchar(80) NOT NULL default '',
 `lastapp` varchar(80) NOT NULL default '',
 `lastdata` varchar(80) NOT NULL default '',
 `duration` int(11) NOT NULL default '0',
 `billsec` int(11) NOT NULL default '0',
 `disposition` varchar(45) NOT NULL default '',
 `amaflags` int(11) NOT NULL default '0',
 `accountcode` varchar(20) NOT NULL default '',
 `uniqueid` varchar(32) NOT NULL default '',
 `userfield` varchar(255) NOT NULL default '',
 PRIMARY KEY  (`recid`),
 KEY `calldate` (`calldate`),
 KEY `dst` (`dst`),
 KEY `accountcode` (`accountcode`),
 KEY `src` (`src`),
 KEY `disposition` (`disposition`),
 KEY `uniqueid` (`uniqueid`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 
 CREATE USER 'asterisk'@'localhost' IDENTIFIED BY
 'PASSWORD';
 GRANT FILE ON * . * TO 'asterisk'@'localhost' IDENTIFIED BY
 'PASSWORD'
 WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
 GRANT INSERT ON `asterisk`.`cdr` TO
 'asterisk'@'localhost';
 
 
 If you're going to be running the mysql database on the
 same server as the
 asterisk box, the following cdr_mysql.conf should also work
 for 1.8:
 
 [global]
 hostname=localhost
 dbname=asterisk
 table=cdr
 password=PASSWORD
 user=asterisk
 port=3306
 sock=/var/lib/mysql/mysql.sock
 userfield=1
 loguniqueid=yes
 
 


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Strange behavior over Zap chennels

2011-10-25 Thread Chandra Perera
Hi,
I was wondering if anyone you got asterisk to work with Fax via google voice
?  If so, can you please send me extension.conf and sip.conf, jabber.conf
and gtalk.conf settings used.  I would prefer faxing with Fax for Asterisk
(FFA) via .call file.  I see post where people got it work with Google
Voice.  Guide is greatly appreciated.

-Charles
Fax Free http://sendfreefax.net
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users