* You are viewing the archive for May 24th, 2012

extension status using AMI

Why don’t you use AMI? There’s are phpami project if you google.

Sent from my iPhone

On May 25, 2012, at 1:51 AM, Kamlesh Kumar wrote:

> Hi,
> I’m using AMI to get the extension status but always get -1 i.e. extension not found.
> #!/usr/bin/php -q
> < ?php
> include_once (“phpagi-2.14/phpagi.php”);
> include_once (“/phpagi-2.14/phpagi-asmanager.php”);
> $agi = new AGI();
> $as = new AGI_AsteriskManager();
> $exten = $agi->request['agi_extension'];
> $as->connect(“localhost”, “user”, “passwd”);
> $status = $as->ExtensionState($exten,’context’,1);
> $status1 = $status['Status'];
> $agi->verbose(“Extension status is “.$status1);
> ?>
> Always return Extension status is -1
> Thanks,
> Kamlesh
> –
> _____________________________________________________________________
> — 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 MixMonitor starts recording 44 bytes file

Hello All,

I have installaed asterisk 10.4 in my machine. Now suddenly MixMonitor
application starts generating 44 Bytes of Recording file.
Is this new tye of Bug? Help me..

Best Regards,
*Jayesh Labade*
e-mail: jayesh.labade@gmail.com

T.38 debug logs

On 05/24/2012 09:54 AM, Arstan wrote:
> Dear list,
> I have a project where I have:
> Asterisk 10 < -->AudioCodes < --> E1< --> Provider
> AudioCodes supports T.38 and passes the faxes through E1 to the
> provider. From what I read, Asterisk 10 has the most stable(full) T.38
> among other releases.

Asterisk 10 has T.38 gateway support, but you won’t be using it here
because your AudioCodes device will be performing that function. Outside
of gateway support, the T.38 functionality in Asterisk 1.8 and Asterisk
10 are very close to identical.

> My Question: Can I somehow see in the logs if T.38 packets sending and
> see somehow its debugs? Or I should just be better off with capturing
> sip data through tcpdump?

This will depend on what you are asking the Asterisk 10 system to *do*
with T.38. Are you sending FAXes from it, or receiving FAXes into it, or
something else entirely?

Call Record File and Play


I am trying to achieve call record file and play the file to the user using
phpagi script.

I am using the following code


$agi->record_file($rand, “gsm”, “0123456789*#”, -1, 0, true, 0);

also tried

$agi->record_file($rand, “wav”, “0123456789*#”, -1, 0, true, 0);

the file is created in the directory but when I try to play the sound I get
the following error incase of gsm

AGI Rx < < STREAM FILE /var/sounds/145712900 "" 0
[May 24 14:00:07] WARNING[22415][C-0000019c]: file.c:492 filehelper: File
/var/sounds/145712900.gsm detected to have zero size.

and the following error incase of wav file format

AGI Rx < < STREAM FILE /var/sounds/1886163042 "" 0
[May 24 14:07:07] WARNING[22587][C-0000019e]: format_wav.c:159
check_header: Does not begin with RIFF
[May 24 14:07:07] WARNING[22587][C-0000019e]: file.c:393 fn_wrapper: Unable
to open format wav
AGI Tx >> 200 result=0 endpos=0