Re: [asterisk-users] AGI script commands

2023-06-30 Thread Eric Wieling
You have to read stdin to accept the data Asterisk sends when the AGI 
starts before you can send any AGI commands to Asterisk.   Also, "agi 
set debug on".


On 6/30/23 21:52, TTT wrote:
I have an AGI script written in PHP that worked great with Asterisk 13.  
I’m porting it to an Asterisk 20 site and have a strange problem.  I 
tried running the script from the command line and it works fine; I see 
the script commands written to stdout like


VERBOSE “SmartScreen v1”

But when run from asterisk the CLI shows:

[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] pbx.c: Executing 
[s@function-smartscreen:2] EAGI("PJSIP/Twilio-NA-W-3-In-0068", 
"smartscreen/smartscreen.php,"GEORGE SMITH" <+1234567890>") in new stack


[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] res_agi.c: Launched 
AGI Script /var/lib/asterisk/agi-bin/smartscreen/smartscreen.php


[2023-06-30 15:50:48] VERBOSE[1264031][C-0025] res_agi.c: 
AGI Script smartscreen/smartscreen.php 
completed, returning 0


I never see any messages or commands sent from the script to stdout (to 
asterisk)  Has the way EAGI operates changed?  This script doesn’t use 
any AGI libraries…just simply read/write to stdin/stdout.





--
http://help.nyigc.net/

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] AGI script commands

2023-06-30 Thread TTT
I have an AGI script written in PHP that worked great with Asterisk 13.  I'm
porting it to an Asterisk 20 site and have a strange problem.  I tried
running the script from the command line and it works fine; I see the script
commands written to stdout like 

 

VERBOSE "SmartScreen v1"

 

But when run from asterisk the CLI shows:

 

[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] pbx.c: Executing
[s@function-smartscreen:2] EAGI("PJSIP/Twilio-NA-W-3-In-0068",
"smartscreen/smartscreen.php,"GEORGE SMITH" <+1234567890>") in new stack

[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] res_agi.c: Launched AGI
Script /var/lib/asterisk/agi-bin/smartscreen/smartscreen.php

[2023-06-30 15:50:48] VERBOSE[1264031][C-0025] res_agi.c:
AGI Script smartscreen/smartscreen.php
completed, returning 0

 

I never see any messages or commands sent from the script to stdout (to
asterisk)  Has the way EAGI operates changed?  This script doesn't use any
AGI libraries.just simply read/write to stdin/stdout.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] AGI Script for thinQ CNAM lookup

2021-04-30 Thread JR Richardson
Hi All,

Does anyone have and can share with me an AGI script to dip thinQ for
cnam? oR perhaps dialplan curl using curlopts?

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses
Chasing the Azeotrope

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] AGI Script Returning 4

2021-01-30 Thread Steve Edwards

On 1/30/21 1:18 PM, Alexander Perkins wrote:

the PHP-AGI script fails after it is executed and simply returns 
'returning 4'.


On Sat, 30 Jan 2021, Michal Rybarik wrote:

I think this can happen by hanging up the call by one party, when SIGHUP 
is sent to AGI script. PHP will exit on SIGHUP. It can be resolved by 
initializing signal handler in PHP script (pcntl_signal) for SIGHUP and 
doing nothing in it (return).


From res_agi.c:

enum agi_result {
AGI_RESULT_FAILURE = -1,
AGI_RESULT_SUCCESS,
AGI_RESULT_SUCCESS_FAST,
AGI_RESULT_SUCCESS_ASYNC,
AGI_RESULT_NOTFOUND,
AGI_RESULT_HANGUP,
};

so, AGI_RESULT_HANGUP == 4.

When Asterisk detects the hangup on the channel, it sends a SIGHUP to your 
AGI.


I always set a signal handler on SIGHUP and do what makes sense to my 
application: maybe some cleanup or syslog() before return() or exit(). 
Almost always exit().


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] AGI Script Returning 4

2021-01-30 Thread Michal Rybarik
Dňa 30. 1. 2021 o 20:18 Alexander Perkins napísal(a):
> HI All.  I have a really strange issue that I'm two months into
> troubleshooting; however, I cannot figure it out.  I have an AGI
> Script (PHP) that runs every time a call comes into my Asterisk box. 
> Most of the time, it runs without any issue.  However, every now and
> then, the PHP-AGI script fails after it is executed and simply returns
> 'returning 4'.  I verify the PHP script begins to run.  However, it
> appears to just stop.  I have placed try/catch statements everywhere,
> but it does not seem to hit them.  
>
> Just to verify, this is the same script running over and over with the
> same parameter.  
>
> Any ideas/suggestions as of what can be happening?


I think this can happen by hanging up the call by one party, when SIGHUP
is sent to AGI script. PHP will exit on SIGHUP. It can be resolved by
initializing signal handler in PHP script (pcntl_signal) for SIGHUP and
doing nothing in it (return).

-- 
Regards,
Michal Rybarik


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] AGI Script Returning 4

2021-01-30 Thread Jeff LaCoursiere

Out of RAM/swap?

j

On 1/30/21 1:18 PM, Alexander Perkins wrote:
HI All.  I have a really strange issue that I'm two months into 
troubleshooting; however, I cannot figure it out.  I have an AGI 
Script (PHP) that runs every time a call comes into my Asterisk box.  
Most of the time, it runs without any issue. However, every now and 
then, the PHP-AGI script fails after it is executed and simply returns 
'returning 4'.  I verify the PHP script begins to run.  However, it 
appears to just stop.  I have placed try/catch statements everywhere, 
but it does not seem to hit them.


Just to verify, this is the same script running over and over with the 
same parameter.


Any ideas/suggestions as of what can be happening?

Thanks,
Alex



--

*Jeff LaCoursiere*
STRATUSTALK, INC. / CTO

Phone:  *+1 703.496.4990 x108*
Mobile: *+1 815.546.6599*
Email:  *j...@stratustalk.com* 
Website:*https://www.stratustalk.com*
Address:*One Freedom Square
13th Floor
Reston, VA 20190*

 
 




-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] AGI Script Returning 4

2021-01-30 Thread Alexander Perkins
HI All.  I have a really strange issue that I'm two months into
troubleshooting; however, I cannot figure it out.  I have an AGI Script
(PHP) that runs every time a call comes into my Asterisk box.  Most of the
time, it runs without any issue.  However, every now and then, the PHP-AGI
script fails after it is executed and simply returns 'returning 4'.  I
verify the PHP script begins to run.  However, it appears to just stop.  I
have placed try/catch statements everywhere, but it does not seem to hit
them.

Just to verify, this is the same script running over and over with the same
parameter.

Any ideas/suggestions as of what can be happening?

Thanks,
Alex
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] AGI script VERBOSE cmd

2014-06-27 Thread Bryant Zimmerman
I am working on an AGI script and all is going well except I can not get 
any of my VERBOSE commands to display.
  
 Is there any undocumented reason for this to occur? I am able to set 
variables, call other commands ect..
  
 I am sending my verbose command in the following format (VERBOSE Message 
to send 4)
  
 Any ideas what I might be doing incorrect?
  
 Thanks

Bryant Zimmerman (ZK Tech Inc.)
616-855-1030 Ext. 2003

-- 
_
-- 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] AGI script VERBOSE cmd

2014-06-27 Thread Rafael Visser
what if yoy change the verbose on the cli?
 cli core set verbose 4
 and then try again

i usually put on my perl agi something like

$verbose=5;
AGI-verbose(the number is $number, $verbose);

hope it helps.

rv


2014-06-27 11:24 GMT-04:00 Bryant Zimmerman brya...@zktech.com:

 I am working on an AGI script and all is going well except I can not get
 any of my VERBOSE commands to display.

 Is there any undocumented reason for this to occur? I am able to set
 variables, call other commands ect..

 I am sending my verbose command in the following format (VERBOSE Message
 to send 4)

 Any ideas what I might be doing incorrect?

 Thanks

 Bryant Zimmerman (ZK Tech Inc.)
 616-855-1030 Ext. 2003

 --
 _
 -- 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

Re: [asterisk-users] AGI script VERBOSE cmd

2014-06-27 Thread Bryant Zimmerman
Hey all
  
 Please disregard my question. I was looking for the word Verbose to show 
up. I was just being dense.
 There was no real issue it is working just different than what I was 
expecting.
  
 Thanks

Bryant
  


 From: Bryant Zimmerman brya...@zktech.com
Sent: Friday, June 27, 2014 11:25 AM
  I am working on an AGI script and all is going well except I can not get 
any of my VERBOSE commands to display.

   Is there any undocumented reason for this to occur? I am able to set 
variables, call other commands ect..

   I am sending my verbose command in the following format (VERBOSE 
Message to send 4)

   Any ideas what I might be doing incorrect?

   Thanks

Bryant 


-- 
_
-- 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] AGI Script not working

2013-12-02 Thread Gopalakrishnan N
Library is Asterisk Perl library and module DBI. The same script working in
different machine with same Asterisk version and same Perl version. Am able
to see Tx and Rx from script.




On Mon, Dec 2, 2013 at 8:08 AM, Eric Wieling ewiel...@nyigc.com wrote:

 Sounds like you are violating the AGI protocol.   Which Perl AGI library
 are you using?


 -Original Message-
 From: asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] On Behalf Of Gopalakrishnan N
 Sent: Saturday, November 30, 2013 1:27 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] AGI Script not working

 I have a Perl AGI script updating some values to database like recorded
 file path, unique ID and callerid. When I run the script with test
 dialplan, its not updating to database.

 Whereas database connection is fine, when I run agi debug I see only Tx
 packets not Rx packets, firewall is also OFF.

 Any other specific reason why there is no Rx.

 The same script working in one more Asterisk machine.

 Regards

 --
 _
 -- 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

Re: [asterisk-users] AGI Script not working

2013-12-02 Thread Gopalakrishnan N
Thanks... I got it working actually I found with this command /usr/bin/perl
-d agi file name from this I got to know that my library is missing and
installed Asterisk-perl module and now its fine.

Once again thank you.


On Mon, Dec 2, 2013 at 3:05 PM, Gopalakrishnan N 
gopalakrishnan...@gmail.com wrote:

 Library is Asterisk Perl library and module DBI. The same script working
 in different machine with same Asterisk version and same Perl version. Am
 able to see Tx and Rx from script.




 On Mon, Dec 2, 2013 at 8:08 AM, Eric Wieling ewiel...@nyigc.com wrote:

 Sounds like you are violating the AGI protocol.   Which Perl AGI library
 are you using?


 -Original Message-
 From: asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] On Behalf Of Gopalakrishnan N
 Sent: Saturday, November 30, 2013 1:27 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] AGI Script not working

 I have a Perl AGI script updating some values to database like recorded
 file path, unique ID and callerid. When I run the script with test
 dialplan, its not updating to database.

 Whereas database connection is fine, when I run agi debug I see only Tx
 packets not Rx packets, firewall is also OFF.

 Any other specific reason why there is no Rx.

 The same script working in one more Asterisk machine.

 Regards

 --
 _
 -- 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

Re: [asterisk-users] AGI Script not working

2013-12-01 Thread Eric Wieling
Sounds like you are violating the AGI protocol.   Which Perl AGI library are 
you using? 


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Gopalakrishnan N
Sent: Saturday, November 30, 2013 1:27 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] AGI Script not working

I have a Perl AGI script updating some values to database like recorded file 
path, unique ID and callerid. When I run the script with test dialplan, its not 
updating to database.

Whereas database connection is fine, when I run agi debug I see only Tx packets 
not Rx packets, firewall is also OFF. 

Any other specific reason why there is no Rx. 

The same script working in one more Asterisk machine. 

Regards

-- 
_
-- 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] AGI Script not working

2013-11-29 Thread Gopalakrishnan N
I have a Perl AGI script updating some values to database like recorded
file path, unique ID and callerid. When I run the script with test
dialplan, its not updating to database.

Whereas database connection is fine, when I run agi debug I see only Tx
packets not Rx packets, firewall is also OFF.

Any other specific reason why there is no Rx.

The same script working in one more Asterisk machine.

Regards
-- 
_
-- 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] AGI Script

2013-03-07 Thread Gustavo Salvador


 Hi, thanks.
 
 
 .Did that include 'agi set debug on?'
 Yes, that include this command.
  
 Can you 'cut-n-paste' the relevant 'sanitized' console output?
 Ok. This is:
  trixbox146002*CLI 
 -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-test.agi
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_request: agi-test.agi
 SIP/INCONCERT-35d2AGI Tx  agi_channel: SIP/INCONCERT-35d2
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_language: en
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_type: SIP
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_uniqueid: 1362669295.35561
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_version: 1.6.0.28-samy-r100
 SIP/INCONCERT-35d2AGI Tx  agi_callerid: 1044
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_calleridname: 1044
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_callingpres: 0
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_callingani2: 0
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_callington: 0
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_callingtns: 0
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_dnid: 701820101044
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_rdnis: unknown
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_context: ModernaDesv_E1
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_extension: s
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_priority: 3
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_enhanced: 0.0
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_accountcode: 
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  agi_threadid: 29367216
 trixbox146002*CLI 
 SIP/INCONCERT-35d2AGI Tx  
 trixbox146002*CLI 
 [Mar  7 10:14:55] NOTICE[32548]: channel.c:3051 __ast_read: Dropping 
 incompatible voice frame on SIP/INCONCERT-35d2 of format ulaw since our 
 native format has changed to 0x8 (alaw)
 trixbox146002*CLI 
 -- SIP/INCONCERT-35d2AGI Script agi-test.agi completed, returning 0
 
 I looked through my AGIs and find I always set channel variables and let the 
 dialplan do the actual dial().
 
 1) Is your AGI exiting before the dial() completes?
 Yes.
  
 2) If you execute the same dial() command from the 'AGI debug output' (which 
 should show the expanded variables) in your dialplan, does that yield andy 
 clues?
 How I do that? I just use the AMI command originate. Executing this with the 
 protocol already works, but not ring.
 
 3) If you use another technology like SIP can you enable SIP debugging and 
 observe the SIP dialog?
 I can not use SIP because the call goes out to E1.
  
 Regards,
 
 Gustavo 
--
_
-- 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] AGI Script

2013-03-06 Thread Gustavo Salvador
 
 Hi every body,
 
 Please if some one could help me with this:
 I'm writing an AGU Perl Script which basically makes a call using an 
 extension provided by other asterisk box to an E1. The asterisk version is 
 1.6.0.28, so it hasn't the Wellington know AGI class. The code is as follows:
 
 =
 #!/usr/bin/perl
 use strict;
 
 my %AGI;
 :
 print EXEC Dial(DAHDI/g2/$AGI{dnid},,W);
 =
 
 When dialplan executes the AGI, asterisk throw the following error: Dropping 
 incompatible voice fraile on SIP/INCONCERT-4796 of formar ulaw since our 
 native format has changed to 0x8 (alaw).
 
 And connection is never make.
 
 It's the code OK?, I'm newbie on asterisk, and really don't know what is 
 going wrong.
 
 Regards,
 
 Gustavo

--
_
-- 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] AGI Script

2013-03-06 Thread Gertjan Baarda
Might be a codec issue, try allow=all in your sip.conf

Sent from my iPhone

On 6 mrt. 2013, at 17:49, Gustavo Salvador
gustavo.salvador...@gmail.com wrote:


 Hi every body,

 Please if some one could help me with this:
 I'm writing an AGU Perl Script which basically makes a call using an 
 extension provided by other asterisk box to an E1. The asterisk version is 
 1.6.0.28, so it hasn't the Wellington know AGI class. The code is as follows:

 =
 #!/usr/bin/perl
 use strict;

 my %AGI;
 :
 print EXEC Dial(DAHDI/g2/$AGI{dnid},,W);
 =

 When dialplan executes the AGI, asterisk throw the following error: 
 Dropping incompatible voice fraile on SIP/INCONCERT-4796 of formar ulaw 
 since our native format has changed to 0x8 (alaw).

 And connection is never make.

 It's the code OK?, I'm newbie on asterisk, and really don't know what is 
 going wrong.

 Regards,

 Gustavo

 --
 _
 -- 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


Re: [asterisk-users] AGI Script

2013-03-06 Thread Gustavo Salvador
Thanks,

But SIP uses the caller box to send the call to the second box where is running 
the AGI script, the second box uses DAHDI to routes the call to E1. I've tested 
the codec routing a call between a E1 extension and a local one with the 
originate extension command and works.
So that is because I'm loose with this

Regards,

Gustavo

On 06/03/2013, at 12:12, Gertjan Baarda gertjan.baa...@gmail.com wrote:

 Might be a codec issue, try allow=all in your sip.conf
 
 Sent from my iPhone
 
 On 6 mrt. 2013, at 17:49, Gustavo Salvador
 gustavo.salvador...@gmail.com wrote:
 
 
 Hi every body,
 
 Please if some one could help me with this:
 I'm writing an AGU Perl Script which basically makes a call using an 
 extension provided by other asterisk box to an E1. The asterisk version is 
 1.6.0.28, so it hasn't the Wellington know AGI class. The code is as 
 follows:
 
 =
 #!/usr/bin/perl
 use strict;
 
 my %AGI;
 :
 print EXEC Dial(DAHDI/g2/$AGI{dnid},,W);
 =
 
 When dialplan executes the AGI, asterisk throw the following error: 
 Dropping incompatible voice fraile on SIP/INCONCERT-4796 of formar 
 ulaw since our native format has changed to 0x8 (alaw).
 
 And connection is never make.
 
 It's the code OK?, I'm newbie on asterisk, and really don't know what is 
 going wrong.
 
 Regards,
 
 Gustavo
 
 --
 _
 -- 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


Re: [asterisk-users] AGI Script

2013-03-06 Thread Steve Edwards

On Wed, 6 Mar 2013, Gustavo Salvador wrote:


I'm writing an AGI Perl Script...



=
#!/usr/bin/perl
use strict;

my %AGI;
:
print EXEC Dial(DAHDI/g2/$AGI{dnid},,W);
=


Is this your entire script or just a snippet? If this is all, this is not 
an AGI.


An AGI is an executable that follows the AGI protocol. At a minimum, this 
means:


1) Read the AGI variables from STDIN.

2) Write an AGI request to STDOUT.

3) Read the AGI response from STDIN.

4) Repeat steps 2  3 as needed.

Asterisk creates the process executing your AGI and sends a bunch of cruft 
to it via the process's STDIN. If you don't read this, even if you don't 
need to use the variables, your AGI will not execute correctly and 
reliably.


If you do not read the response after every request, your AGI will not 
execute correctly and reliably.


Most people use an established AGI library since nobody understands the 
implications of the protocol correctly the first time.


Can you enable AGI debugging on the Asterisk console and see if that 
yields any clues?


When dialplan executes the AGI, asterisk throw the following error: 
Dropping incompatible voice fraile on SIP/INCONCERT-4796 of formar 
ulaw since our native format has changed to 0x8 (alaw).


(Actual 'cut-n-paste' is better than 'retyping' console output.)

I think if you take another look, this is a warning, not an error. No big 
deal, it means just what it says, just ignore it.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- 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] AGI Script

2013-03-06 Thread Gustavo Salvador
Thanks Steve,

That was just a snippet, the complete script is as follow:

#!/usr/bin/perl

use strict;


$|=1;


# Setup some variables

my %AGI; my $tests = 0; my $fail = 0; my $pass = 0;

my $key; my $value;


while(STDIN) {

chomp;

last unless length($_);

if (/^agi_(\w+)\:\s+(.*)$/) {

$AGI{$1} = $2;

}

}


print STDERR AGI Environment Dump:\n;

foreach my $i (sort keys %AGI) {

print STDERR  -- $i = $AGI{$i}\n;

}


sub checkresult {

my ($res) = @_;

my $retval;

$tests++;

chomp $res;

if ($res =~ /^200/) {

$res =~ /result=(-?\d+)/;

if (!length($1)) {

print STDERR FAIL ($res)\n;

$fail++;

} else {

print STDERR PASS ($1)\n;

$pass++;

}

} else {

print STDERR FAIL (unexpected result '$res')\n;

$fail++;

}

}


my $count = keys(%AGI);

print EXEC Dial('DAHDI/g2/$AGI{dnid},,W');

my $result = STDIN;

checkresult($result);

There I'm not using the AGI class because as test not works ( seems to me 
because it is not there within this asterisk version) . I have tested the 
Script communication with asterisk works making it to execute a voice prompt.

I have run asterisk in verbose mode, and also set on the debug, but the only 
clue I have is just this error.

Regards,

Gustavo

On 06/03/2013, at 13:24, Steve Edwards asterisk@sedwards.com wrote:

 On Wed, 6 Mar 2013, Gustavo Salvador wrote:
 
 I'm writing an AGI Perl Script...
 
 =
 #!/usr/bin/perl
 use strict;
 
 my %AGI;
 :
 print EXEC Dial(DAHDI/g2/$AGI{dnid},,W);
 =
 
 Is this your entire script or just a snippet? If this is all, this is not an 
 AGI.
 
 An AGI is an executable that follows the AGI protocol. At a minimum, this 
 means:
 
 1) Read the AGI variables from STDIN.
 
 2) Write an AGI request to STDOUT.
 
 3) Read the AGI response from STDIN.
 
 4) Repeat steps 2  3 as needed.
 
 Asterisk creates the process executing your AGI and sends a bunch of cruft to 
 it via the process's STDIN. If you don't read this, even if you don't need to 
 use the variables, your AGI will not execute correctly and reliably.
 
 If you do not read the response after every request, your AGI will not 
 execute correctly and reliably.
 
 Most people use an established AGI library since nobody understands the 
 implications of the protocol correctly the first time.
 
 Can you enable AGI debugging on the Asterisk console and see if that yields 
 any clues?
 
 When dialplan executes the AGI, asterisk throw the following error: 
 Dropping incompatible voice fraile on SIP/INCONCERT-4796 of formar 
 ulaw since our native format has changed to 0x8 (alaw).
 
 (Actual 'cut-n-paste' is better than 'retyping' console output.)
 
 I think if you take another look, this is a warning, not an error. No big 
 deal, it means just what it says, just ignore it.
 
 -- 
 Thanks in advance,
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000
 
 --
 _
 -- 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


Re: [asterisk-users] AGI Script

2013-03-06 Thread Steve Edwards

Please don't top-post...

On 06/03/2013, at 13:24, Steve Edwards asterisk@sedwards.com 
wrote:


Can you enable AGI debugging on the Asterisk console and see if that 
yields any clues?


On Wed, 6 Mar 2013, Gustavo Salvador wrote:

I have run asterisk in verbose mode, and also set on the debug, but the 
only clue I have is just this error.


Did that include 'agi set debug on?'

Can you 'cut-n-paste' the relevant 'sanitized' console output?

I looked through my AGIs and find I always set channel variables and let 
the dialplan do the actual dial().


1) Is your AGI exiting before the dial() completes?

2) If you execute the same dial() command from the 'AGI debug output' 
(which should show the expanded variables) in your dialplan, does that 
yield andy clues?


3) If you use another technology like SIP can you enable SIP debugging and 
observe the SIP dialog?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- 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] AGI script that uses google's text to speech engine

2011-12-13 Thread Lefteris Zafiris
Hello,

version 0.3 of the asterisk-googletts AGI script just got released,
most noticeable changes are:
The script can now be used to easily build IVRs.  
Fixed compatibility with asterisk 1.4 and older.
Fixed compatibility with older perl versions(5.8.8).
Better input handling.

The latest release, documentation and dialplan examples can be found
here: http://zaf.github.com/asterisk-googletts/

A big thank you to all the users that contributed with feedback,
bug reports and suggestions.


Lefteris Zafiris

--
_
-- 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] AGI script that uses google's text to speech engine

2011-12-01 Thread bakko
Hello,

when I use the Agi, sometimes not play the phrase:

WARNING[30391]: file.c:650 ast_openstream_full: File ggl_U0sBo0 does not exist 
in any format

Regards
  - Original Message - 
  From: Lefteris Zafiris 
  To: asterisk-users@lists.digium.com 
  Sent: Wednesday, November 30, 2011 7:42 PM
  Subject: [asterisk-users] AGI script that uses google's text to speech engine


  Hello,
  I have written an AGI script for asterisk that uses google translate for text 
to speech synthesis.
  It supports a variety of different languages, local caching for the voice 
data and wideband audio.
  The voice in most languages is female and the quality of the synthesized 
speech is very high.
  More info about the script can be found here: 
http://zaf.github.com/asterisk-googletts/
  the first public release ca be obtained here: 
https://github.com/downloads/zaf/asterisk-googletts/asterisk-googletts-0.2.tar.gz

  To get a sample of the speech synthesis quality try this link:
  
http://translate.google.com/translate_tts?tl=enq=this+is+a+test+for+google+text+to+speech+engine

  The code is still very young so suggestions, comments and bug reports are 
more than welcome.

  --
  Lefteris Zafiris



--


  --
  _
  -- 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

Re: [asterisk-users] AGI script that uses google's text to speech engine

2011-12-01 Thread Kingsley Tart
Hi. Aside from converting spaces to plus signs, you don't encode any
special characters before putting them in the URL. It might be safer to
run $line through some sort of encoding before calling Google with it,
even if most special characters probably don't result in any sound.
Google say and if you give it an ampersand, but unescaped you couldn't
include that in the string.

You may decide to have an option to locally cache pre-produced sound
files in case that phrase is used again.

Cheers,
Kingsley.

On Thu, 2011-12-01 at 02:42 +0200, Lefteris Zafiris wrote:
 Hello,
 I have written an AGI script for asterisk that uses google translate
 for text to speech synthesis.
 It supports a variety of different languages, local caching for the
 voice data and wideband audio.
 The voice in most languages is female and the quality of the
 synthesized speech is very high.
 More info about the script can be found here:
 http://zaf.github.com/asterisk-googletts/
 the first public release ca be obtained here:
 https://github.com/downloads/zaf/asterisk-googletts/asterisk-googletts-0.2.tar.gz
 
 To get a sample of the speech synthesis quality try this link:
 http://translate.google.com/translate_tts?tl=enq=this+is+a+test+for
 +google+text+to+speech+engine
 
 The code is still very young so suggestions, comments and bug reports
 are more than welcome.
 
 --
 Lefteris Zafiris
 --
 _
 -- 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


Re: [asterisk-users] AGI script that uses google's text to speech engine

2011-12-01 Thread Lefteris Zafiris
On Thu, 1 Dec 2011 09:43:29 -0500
bakko asannu...@gmail.com wrote:

 Hello,
 
 when I use the Agi, sometimes not play the phrase:
 
 WARNING[30391]: file.c:650 ast_openstream_full: File ggl_U0sBo0 does
 not exist in any format
 
 Regards

Seems like the script failed to convert the mp3 data that gets from
google to raw slinear. In that case mpg123 or sox
failed to run. It would be very helpful if you could send the full
console output with verbosity set to 3. Please reply to my mail address
so we don't pollute the list.

Thanks for the feedback


Lefteris Zafiris
  


--
_
-- 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] AGI script that uses google's text to speech engine

2011-12-01 Thread Danny Nicholas
I personally don't like the use of mpg123 for playback - would prefer use of
the internal Playback/background functions.  Still seems to be a nice
effort though.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Kingsley Tart
Sent: Thursday, December 01, 2011 11:24 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI script that uses google's text to speech
engine

Hi. Aside from converting spaces to plus signs, you don't encode any special
characters before putting them in the URL. It might be safer to run $line
through some sort of encoding before calling Google with it, even if most
special characters probably don't result in any sound.
Google say and if you give it an ampersand, but unescaped you couldn't
include that in the string.

You may decide to have an option to locally cache pre-produced sound files
in case that phrase is used again.

Cheers,
Kingsley.

On Thu, 2011-12-01 at 02:42 +0200, Lefteris Zafiris wrote:
 Hello,
 I have written an AGI script for asterisk that uses google translate 
 for text to speech synthesis.
 It supports a variety of different languages, local caching for the 
 voice data and wideband audio.
 The voice in most languages is female and the quality of the 
 synthesized speech is very high.
 More info about the script can be found here:
 http://zaf.github.com/asterisk-googletts/
 the first public release ca be obtained here:
 https://github.com/downloads/zaf/asterisk-googletts/asterisk-googletts
 -0.2.tar.gz
 
 To get a sample of the speech synthesis quality try this link:
 http://translate.google.com/translate_tts?tl=enq=this+is+a+test+for
 +google+text+to+speech+engine
 
 The code is still very young so suggestions, comments and bug reports 
 are more than welcome.
 
 --
 Lefteris Zafiris
 --
 _
 -- 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


Re: [asterisk-users] AGI script that uses google's text to speech engine

2011-12-01 Thread Lefteris Zafiris
On Thu, 01 Dec 2011 17:23:59 +
Kingsley Tart kings...@skymarket.co.uk wrote:

 Hi. Aside from converting spaces to plus signs, you don't encode any
 special characters before putting them in the URL. It might be safer
 to run $line through some sort of encoding before calling Google with
 it, even if most special characters probably don't result in any
 sound. Google say and if you give it an ampersand, but unescaped
 you couldn't include that in the string.
 
 You may decide to have an option to locally cache pre-produced sound
 files in case that phrase is used again.
 
 Cheers,
 Kingsley.
 

Thanks for the suggestion. Ther's already some sort of input sanitation:
 $AGI{arg_1} =~ s/[\\\/|*~^\(\)\[\]\{\}\n\r]/ /g;
that strips most special characters but i guess it needs some more work.
As for the caching the script supports it already, its enabled by
default and controlled by these 2 variables in the script:
 $usecache   = 1;
 $cachedir   = /tmp;
Voice data gets stored in the cachedir for future use so we don't have
to fetch it from google each time.


Lefteris Zafiris

--
_
-- 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] AGI script that uses google's text to speech engine

2011-12-01 Thread Lefteris Zafiris
On Thu, 1 Dec 2011 11:35:21 -0600
Danny Nicholas da...@debsinc.com wrote:

 I personally don't like the use of mpg123 for playback - would prefer
 use of the internal Playback/background functions.  Still seems to
 be a nice effort though.

mpg123 used to convert the mp3 data that we get from google to wav. The
wav file is passed to sox that converts it to raw slinear and then its
played back by asterisk using the 'stream file' agi command.

I don't really like calling all these system commands but I thought it
would be better for the users to have the voice data in sln than mp3
since format_mp3 module isn't available in many installations.


Lefteris Zafiris 

--
_
-- 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] AGI script that uses google's text to speech engine

2011-12-01 Thread Torbjörn Abrahamsson
This is because you need to add /tmp to the STREAM command, ie:

print STREAM FILE /tmp/$tmpname \$intkey\\n;

$tmpname seems to not contain the path, so it will look in
/var/lib/asterisk/sounds for the file...

This at least made it work for me... (After fixing some other things to make
it work with asterisk 1.2...)

BR,
Torbjörn Abrahamsson



-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lefteris
Zafiris
Sent: den 1 december 2011 18:34
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] AGI script that uses google's text to speech
engine

On Thu, 1 Dec 2011 09:43:29 -0500
bakko asannu...@gmail.com wrote:

 Hello,
 
 when I use the Agi, sometimes not play the phrase:
 
 WARNING[30391]: file.c:650 ast_openstream_full: File ggl_U0sBo0 does
 not exist in any format
 
 Regards

Seems like the script failed to convert the mp3 data that gets from
google to raw slinear. In that case mpg123 or sox
failed to run. It would be very helpful if you could send the full
console output with verbosity set to 3. Please reply to my mail address
so we don't pollute the list.

Thanks for the feedback


Lefteris Zafiris
  


--
_
-- 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


Re: [asterisk-users] AGI script that uses google's text to speech engine

2011-12-01 Thread Lefteris Zafiris
On Thu, 1 Dec 2011 21:51:21 +0100
Torbjörn Abrahamsson torbjorn.abrahams...@gmail.com wrote:

 This is because you need to add /tmp to the STREAM command, ie:
 
 print STREAM FILE /tmp/$tmpname \$intkey\\n;
 
 $tmpname seems to not contain the path, so it will look in
 /var/lib/asterisk/sounds for the file...
 
 This at least made it work for me... (After fixing some other things
 to make it work with asterisk 1.2...)
 
 BR,
 Torbjörn Abrahamsson
 

$tmpname is supposed to include the full path together with the temp
dir since its created with the option 'TMPDIR = 1' during the call of
tempfile() and it does so in my system that runs perl 5.14.2. I guess
that might not be true for older versions of perl(?)
Can you please tell me what version of perl you are using?
The oldest perl I can get my hands on is 5.8.8 on RHEL 5.x machines.
I will try to test there and see whats going on.

Thanks for the feedback.


Lefteris Zafiris

--
_
-- 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] AGI script that uses google's text to speech engine

2011-12-01 Thread Torbjörn Abrahamsson
This was run on an Fedora 8 machine, with perl 5.8.8. I also found it odd that 
the path was not included...

// T


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Lefteris Zafiris
Sent: den 1 december 2011 22:48
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] AGI script that uses google's text to speech 
engine

On Thu, 1 Dec 2011 21:51:21 +0100
Torbjörn Abrahamsson torbjorn.abrahams...@gmail.com wrote:

 This is because you need to add /tmp to the STREAM command, ie:
 
 print STREAM FILE /tmp/$tmpname \$intkey\\n;
 
 $tmpname seems to not contain the path, so it will look in
 /var/lib/asterisk/sounds for the file...
 
 This at least made it work for me... (After fixing some other things
 to make it work with asterisk 1.2...)
 
 BR,
 Torbjörn Abrahamsson
 

$tmpname is supposed to include the full path together with the temp
dir since its created with the option 'TMPDIR = 1' during the call of
tempfile() and it does so in my system that runs perl 5.14.2. I guess
that might not be true for older versions of perl(?)
Can you please tell me what version of perl you are using?
The oldest perl I can get my hands on is 5.8.8 on RHEL 5.x machines.
I will try to test there and see whats going on.

Thanks for the feedback.


Lefteris Zafiris

--
_
-- 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

Re: [asterisk-users] AGI script that uses google's text to speech engine

2011-12-01 Thread Lefteris Zafiris
On Thu, 1 Dec 2011 23:23:56 +0100
Torbjörn Abrahamsson torbjorn.abrahams...@gmail.com wrote:

 This was run on an Fedora 8 machine, with perl 5.8.8. I also found it
 odd that the path was not included...
 
 // T
 
It seems this is an issue with older versions of perl or at least with
5.8.8. Since this version is used in RHEL/CentOS 5.x that many people
run on their servers, this is a serious problem.

Changing the way tempfile() is called from: 
tempfile(ggl_XX, TMPDIR = 1, UNLINK = 1)
to:
tempfile(ggl_XX, DIR = $tmpdir, UNLINK = 1)
seems to address this issue.

An updated version including this fix can be obtained here:
http://github.com/zaf/asterisk-googletts/tarball/master


Lefteris Zafiris

--
_
-- 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] AGI script that uses google's text to speech engine

2011-11-30 Thread Lefteris Zafiris
Hello,
I have written an AGI script for asterisk that uses google translate for
text to speech synthesis.
It supports a variety of different languages, local caching for the voice
data and wideband audio.
The voice in most languages is female and the quality of the synthesized
speech is very high.
More info about the script can be found here:
http://zaf.github.com/asterisk-googletts/
the first public release ca be obtained here:
https://github.com/downloads/zaf/asterisk-googletts/asterisk-googletts-0.2.tar.gz

To get a sample of the speech synthesis quality try this link:
http://translate.google.com/translate_tts?tl=enq=this+is+a+test+for+google+text+to+speech+engine

The code is still very young so suggestions, comments and bug reports are
more than welcome.

--
Lefteris Zafiris
--
_
-- 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] Agi script for working hours PBX

2011-06-27 Thread mahesh katta
Hi ,

can you any buddy provide agi script in perl or php for,
only working hours incomming calls forward to his cellno., and after working
hours should be play one playback msg then forward voicemail to his
extension.
working hours(sun - thu, 9:00 to 19:00)

ex: dialplan
exten = 4578901,2,AGI(agi://127.0.0.1:4577/call_log)
exten =
4578901,3,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALLERIDNUM}-${EXTEN}-${UNIQUEID}.gsm|av(0)V(0))
exten = 4578901,4,Dial(SIP/5001,30,tTo)
exten = 4578901,5,Set(CALLERID(all)=044578901)
exten = 4578901,6,Dial(Zap/g0/0554721368,,tTo)
exten = 4578901,7,Hangup

Best Regards,

Mahesh Katta
*BUZZ**WORKS* Business Services Private Limited
BANGALORE | CHENNAI | HYDERABAD | MUMBAI| DELHI
201, Crystal Tower, 75 Gundavali Cross Lane, Andheri Kurla Road, Andheri (E)
Mumbai 400069
GSM +91.97029.70779 | Phone +91.22.4229.2634 | Fax +91.22.4229.2634
Web http://www.buzzworks.com
--
_
-- 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] Agi script for working hours PBX

2011-06-27 Thread Alex Balashov

On 06/27/2011 05:30 AM, mahesh katta wrote:


can you any buddy provide agi script in perl or php for,
only working hours incomming calls forward to his cellno., and after
working hours should be play one playback msg then forward voicemail to
his extension.
working hours(sun - thu, 9:00 to 19:00)


Have you considered using the GotoIfTime() dial plan application?

--
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

--
_
-- 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] Agi script for working hours PBX

2011-06-27 Thread Satish Barot
Wasn't that helpful?
http://lists.digium.com/pipermail/asterisk-users/2011-June/264082.html
Use GotoIfTime in agi of your choice with condition part being calculated
dynamically as per your requirement.

But I really don't see any usefulness of AGI if your working hours are fixed
i.e. Mon - Thu, 9:00 to 19:00.
[SATISH]
Mumbai, India.

On Mon, Jun 27, 2011 at 3:00 PM, mahesh katta maheshka...@flexydial.comwrote:

 Hi ,

 can you any buddy provide agi script in perl or php for,
 only working hours incomming calls forward to his cellno., and after
 working hours should be play one playback msg then forward voicemail to his
 extension.
 working hours(sun - thu, 9:00 to 19:00)

 ex: dialplan
 exten = 4578901,2,AGI(agi://127.0.0.1:4577/call_log)
 exten =
 4578901,3,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALLERIDNUM}-${EXTEN}-${UNIQUEID}.gsm|av(0)V(0))
 exten = 4578901,4,Dial(SIP/5001,30,tTo)
 exten = 4578901,5,Set(CALLERID(all)=044578901)
 exten = 4578901,6,Dial(Zap/g0/0554721368,,tTo)
 exten = 4578901,7,Hangup

 Best Regards,

 Mahesh Katta
 *BUZZ**WORKS* Business Services Private Limited
 BANGALORE | CHENNAI | HYDERABAD | MUMBAI| DELHI
 201, Crystal Tower, 75 Gundavali Cross Lane, Andheri Kurla Road, Andheri
 (E) Mumbai 400069
 GSM +91.97029.70779 | Phone +91.22.4229.2634 | Fax +91.22.4229.2634
 Web http://www.buzzworks.com


 --
 _
 -- 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

Re: [asterisk-users] AGI script dies after receivefax

2011-02-19 Thread Kevin P. Fleming

On 02/18/2011 07:30 PM, Mike Diehl wrote:

Hi all,

I've got a perl agi script that exec()'s the FFA version of receivefax
to... receive a fax.

However, after the fax is received, the script seems to die.

This is what I have:

$main::agi-exec(receivefax,/tmp/${$}.tiff|fs);
$main::agi-verbose(FAX COMPLETE,1);

I never see the FAX COMPLETE message on the console, I've set verbose
to 25. Any ideas? I'd like to take the next few instructions to log
success/failure.


Like many Asterisk dialplan applications, ReceiveFAX causes the channel 
to be hung up when it completes its work. You may have to take special 
steps to keep your AGI script alive in that situation,,, but someone who 
knows more about AGI would have to chime in. It would also help if you 
indicated what version of Asterisk you are using, since there are quite 
a few and their behavior in this situation could be different.


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kflem...@digium.com
Check us out at www.digium.com  www.asterisk.org

--
_
-- 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] AGI script dies after receivefax

2011-02-18 Thread Mike Diehl
Hi all,

I've got a perl agi script that exec()'s the FFA version of receivefax to...
receive a fax.

However, after the fax is received, the script seems to die.

This is what I have:

$main::agi-exec(receivefax,/tmp/${$}.tiff|fs);
$main::agi-verbose(FAX COMPLETE,1);

I never see the FAX COMPLETE message on the console, I've set verbose to
25.  Any ideas?  I'd like to take the next few instructions to log
success/failure.
--

Take care and have fun,
Mike Diehl.

--
_
-- 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] AGI script dies after receivefax

2011-02-18 Thread Steve Edwards

On Fri, 18 Feb 2011, Mike Diehl wrote:


I've got a perl agi script that exec()'s the FFA version of receivefax to... 
receive a fax.

However, after the fax is received, the script seems to die.

This is what I have:

$main::agi-exec(receivefax,/tmp/${$}.tiff|fs);
$main::agi-verbose(FAX COMPLETE,1);

I never see the FAX COMPLETE message on the console, I've set verbose to 25.  
Any ideas?  I'd like to take the next few instructions to log
success/failure.


What version of Asterisk?

Would enabling AGI debugging on the console shed any light?

Any chance receivefax is generating a signal you're not trapping?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000--
_
-- 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] AGI script dies after receivefax

2011-02-18 Thread Mike Diehl

--

Take care and have fun,
Mike Diehl.



--
_
-- 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] AGI script dies after receivefax

2011-02-18 Thread Mike Diehl

--

Take care and have fun,
Mike Diehl.



--
_
-- 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] AGI script exits non-zero when running system command

2011-02-02 Thread Tilghman Lesher
On Tuesday 01 February 2011 23:43:34 Charles Solar wrote:
 Hey guys I was hoping I could get a few pointers on a problem I have
 been trying to debug for the last couple of months regarding asterisk
 AGI scripts and unexpected termination.
 I have this agi script that accepts incoming faxes using RxFax on the
 latest asterisk 1.4 branch. Its written with perl and it works fine
 except for one line that causes the entire script to terminate
 unexpectedly.
snip
 AGI Tx  200 result=0
 AGI Rx  VERBOSE Converting /tmp/1296624119.53.tiff to
 /tmp/1296624119.53.pdf 1
   fax.agi: Converting /tmp/1296624119.53.tiff to /tmp/1296624119.53.pdf
 AGI Tx  200 result=1
 Really destroying SIP dialog '371b80c6324ece0c779653c34d2e88a2@XXX'
 Method: INVITE
   == Spawn extension (from-trunk, XX, 3) exited non-zero on
 'SIP/trunk-0035'

This isn't the script terminating non-zero.  It's the channel hanging up.

One possible problem might be that your script is not properly handling the
SIGHUP signal sent to the AGI process when a hangup occurs.  If that is the
case, then your script may be terminating early due to the signal.  The
best way to handle that is to set a signal handler in your script (this is
dependent upon the language you're using), although there's also a
workaround for people who are unwilling or unable to set a signal handler.

Just remember that prior to Asterisk 1.6.2, once you receive the SIGHUP,
you may no longer interact with the Asterisk process.  That includes
setting and retrieving variables and using the VERBOSE command.  Starting
with Asterisk 1.6.2, an AGI is free to continue interacting with Asterisk
(the setting of final variables is likely the most productive task).

-- 
Tilghman

--
_
-- 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] AGI script exits non-zero when running system command

2011-02-02 Thread Charles Solar
Thanks for the useful information, I had forgotten about SIGHUP since I
usually work with asterisk 1.6.
I think however that it would be more acurate to say that the channel is
hanging up due to the script crash.  I tried moving the command around in
the script and it crashes exactly on the system call.  Also if I remove the
system call it works perfectly.  I have a feeling calling the system command
is producing the condition to crash the script and hang up the channel.
You did remind me of DeadAGI however, and that actually worked.  I was using
AGI ( again, thanks to asterisk 1.6 experience ) and I forgot asterisk 1.4
is a little more picky.  Once I changed to DeadAGI the script worked.
I did try adding an ignore handler for SIGHUP but that did not work.  It is
very strange, but I would say from this experience that it is not wise to
use a system call from a script started with AGI() in asterisk 1.4.

Thanks for the lead, it helped greatly.

On Wed, Feb 2, 2011 at 1:13 PM, Tilghman Lesher tilgh...@meg.abyt.eswrote:

 On Tuesday 01 February 2011 23:43:34 Charles Solar wrote:
  Hey guys I was hoping I could get a few pointers on a problem I have
  been trying to debug for the last couple of months regarding asterisk
  AGI scripts and unexpected termination.
  I have this agi script that accepts incoming faxes using RxFax on the
  latest asterisk 1.4 branch. Its written with perl and it works fine
  except for one line that causes the entire script to terminate
  unexpectedly.
 snip
  AGI Tx  200 result=0
  AGI Rx  VERBOSE Converting /tmp/1296624119.53.tiff to
  /tmp/1296624119.53.pdf 1
fax.agi: Converting /tmp/1296624119.53.tiff to /tmp/1296624119.53.pdf
  AGI Tx  200 result=1
  Really destroying SIP dialog '371b80c6324ece0c779653c34d2e88a2@XXX'
  Method: INVITE
== Spawn extension (from-trunk, XX, 3) exited non-zero on
  'SIP/trunk-0035'

 This isn't the script terminating non-zero.  It's the channel hanging up.

 One possible problem might be that your script is not properly handling the
 SIGHUP signal sent to the AGI process when a hangup occurs.  If that is the
 case, then your script may be terminating early due to the signal.  The
 best way to handle that is to set a signal handler in your script (this is
 dependent upon the language you're using), although there's also a
 workaround for people who are unwilling or unable to set a signal handler.

 Just remember that prior to Asterisk 1.6.2, once you receive the SIGHUP,
 you may no longer interact with the Asterisk process.  That includes
 setting and retrieving variables and using the VERBOSE command.  Starting
 with Asterisk 1.6.2, an AGI is free to continue interacting with Asterisk
 (the setting of final variables is likely the most productive task).

 --
 Tilghman

 --
 _
 -- 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] AGI script exits non-zero when running system command

2011-02-01 Thread Charles Solar
Hey guys I was hoping I could get a few pointers on a problem I have been
trying to debug for the last couple of months regarding asterisk AGI scripts
and unexpected termination.
I have this agi script that accepts incoming faxes using RxFax on the latest
asterisk 1.4 branch. Its written with perl and it works fine except for one
line that causes the entire script to terminate unexpectedly.

The script always terminates at the point where I use the 'system' command
or backticks to run a system command.
Example:
system( /usr/bin/tiff2pdf -f -p letter -o $faxpath/$unique.pdf
$faxpath/$unique.tiff );

The asterisk log with agi debugging on is pasted below

I have tried everything I can think of over the past few months, taking a
break every so often obviously, but now I feel like I really need outside
eyes.

Its worth noting that the script runs fine without running the system
command, and it does not matter which system command I run.  I tried just
doing a simple copy of the file and it failed in the same place.
Asterisk leaves me with little help, just explaining that the script
returned non-zero.

Are there any issues I should be aware of when running system commands from
an AGI script?  I did check permissions and made sure my asterisk user can
write to /tmp and use the converting commands.  I did a lot more testing of
course but that is probably the biggest face-palm error there could be.

Asterisk log:

-- Launched AGI Script /var/lib/asterisk/agi-bin/fax.agi
AGI Tx  agi_request: fax.agi
AGI Tx  agi_channel: SIP/trunk-0035
AGI Tx  agi_language: en
AGI Tx  agi_type: SIP
AGI Tx  agi_uniqueid: 1296624119.53
AGI Tx  agi_callerid: anonymous
AGI Tx  agi_calleridname: Anonymous
AGI Tx  agi_callingpres: 32
AGI Tx  agi_callingani2: 0
AGI Tx  agi_callington: 0
AGI Tx  agi_callingtns: 0
AGI Tx  agi_dnid: XX
AGI Tx  agi_rdnis: unknown
AGI Tx  agi_context: from-trunk
AGI Tx  agi_extension: XX
AGI Tx  agi_priority: 3
AGI Tx  agi_enhanced: 0.0
AGI Tx  agi_accountcode:
AGI Tx 
AGI Rx  GET VARIABLE EXTEN
AGI Tx  200 result=1 (XX)
AGI Rx  GET VARIABLE CALLERID(num)
AGI Tx  200 result=1 (anonymous)
AGI Rx  VERBOSE DEBUG: EXTEN - XX CID - anonymous 1
  fax.agi: DEBUG: EXTEN - XX CID - anonymous
AGI Tx  200 result=1
AGI Rx  GET VARIABLE UNIQUEID
AGI Tx  200 result=1 (1296624119.53)
AGI Rx  VERBOSE RxFAX XX: /tmp/1296624119.53.tiff 1
  fax.agi: RxFAX XX: /tmp/1296624119.53.tiff
AGI Tx  200 result=1
AGI Rx  EXEC RxFAX /tmp/1296624119.53.tiff
-- AGI Script Executing Application: (RxFAX) Options:
(/tmp/1296624119.53.tiff)
Really destroying SIP dialog '6327EDB3@XXX' Method: OPTIONS
[Feb  1 23:22:18] ERROR[13753]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:214 phase_e_handler:
[FaxReceived ERROR] result (13) Unexpected message received.
 [FaxReceived ERROR] result (13) Unexpected message received.
[Feb  1 23:22:18] WARNING[13753]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:478 fax_run: RXFAX:
t30_call_active is FALSE.
AGI Tx  200 result=0
AGI Rx  EXEC RxFAX /tmp/1296624119.53.tiff
-- AGI Script Executing Application: (RxFAX) Options:
(/tmp/1296624119.53.tiff)
Really destroying SIP dialog '132f38cb284eef837df0038477511f55@XXX' Method:
OPTIONS
REGISTER attempt 1 to XX@trunk
Really destroying SIP dialog '33dff0b60f7ce29944351e446c2e7b5b@XXX' Method:
REGISTER
Really destroying SIP dialog 'AE6C429F@XXX' Method: OPTIONS
[Feb  1 23:23:17] NOTICE[13753]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:230 phase_d_handler:
[RXFAX NEW PAGE]: Channel: SIP/trunk-0035 Pages: -1224970700 Speed:
14400
[Feb  1 23:23:17] NOTICE[13753]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:231
phase_d_handler:Bad rows: 0 - Longest bad row run: 0 -
Compression type: T.4 2-D
[Feb  1 23:23:17] NOTICE[13753]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:232
phase_d_handler:Image size bytes: 86071 - Image size: 1728 x
2156 - Image resolution: 8031 x 7700
-- [RXFAX NEW PAGE]: Channel: SIP/trunk-0035 Pages: -1224970700
Speed: 14400
[Feb  1 23:23:18] NOTICE[13752]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:230 phase_d_handler:
[RXFAX NEW PAGE]: Channel: SIP/trunk-0034 Pages: -1225599608 Speed:
14400
[Feb  1 23:23:18] NOTICE[13752]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:231
phase_d_handler:Bad rows: 0 - Longest bad row run: 0 -
Compression type: T.4 2-D
[Feb  1 23:23:18] NOTICE[13752]:
/usr/src/asterisk/agx-ast-addons/app-spandsp/app_fax.c:232
phase_d_handler:Image size bytes: 86072 - Image size: 1728 x
2156 - Image resolution: 8031 x 7700
-- [RXFAX NEW PAGE]: Channel: SIP/trunk-0034 Pages: -1225599608
Speed: 14400
Really destroying SIP dialog '439a2cca2a745a565a4e0aab56a054b8@XXX' Method:
OPTIONS
Really destroying SIP dialog '49515A3F@XXX' Method: OPTIONS
[Feb  1 23:23:59] NOTICE[13753]:

[asterisk-users] AGI script

2009-09-28 Thread michel freiha
Dear All,

I have a perl script running on my asterisk server...This script is running
for all incoming calls...It checks if a user is registered on openSIPS
server...Else it return a busy tone...

I would like to ask you please about the syntax to call a dialplan defined
on extensions.conf for a specific condition

Regards
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] AGI script

2009-02-23 Thread michel freiha
Dear Sir,

Kindly note that the problem is on command  $AGI-get_variable('
variablename');

The AGI seems that it's not reading nothing from asterisk

Regards


On Mon, Feb 23, 2009 at 9:26 AM, Yawar Hadi yawarh...@gmail.com wrote:

 ohh got it...sorry for miss interpretation




 On Mon, Feb 23, 2009 at 12:23 PM, Yawar Hadi yawarh...@gmail.com wrote:

 How ?


 On Mon, Feb 23, 2009 at 12:09 PM, Steve Edwards asterisk.org@
 sedwards.com wrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  dear steve
any issue u havent replied.?

 You have me confused with michel freiha.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-23 Thread Yawar Hadi
i got the problem.

i am looking for a wrong variable.
if u want to read variables from astersk with $AGI-get_variable() command
then write the variable name as mentioned on voip-info site.

so if u want to read extension then supplu variable name like
$myno=$AGI-get_variable('EXTEN');
hope u get it


On Mon, Feb 23, 2009 at 1:14 PM, michel freiha mich...@gmail.com wrote:

 Dear Sir,

 Kindly note that the problem is on command  $AGI-get_variable('
 variablename');

 The AGI seems that it's not reading nothing from asterisk

 Regards


 On Mon, Feb 23, 2009 at 9:26 AM, Yawar Hadi yawarh...@gmail.com wrote:

 ohh got it...sorry for miss interpretation




 On Mon, Feb 23, 2009 at 12:23 PM, Yawar Hadi yawarh...@gmail.com wrote:

 How ?


 On Mon, Feb 23, 2009 at 12:09 PM, Steve Edwards asterisk.org@
 sedwards.com wrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  dear steve
any issue u havent replied.?

 You have me confused with michel freiha.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867
 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-23 Thread michel freiha
Hello Hadi,

EXTEN is working fine and I can get the dialed number...Now suppose I need
to fetche the extension username from where I'm dialing...What is the
variable name here?Or where i can find Variables name...Can you give me a
link where these variables are defined?

Regards

On Mon, Feb 23, 2009 at 10:56 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i got the problem.

 i am looking for a wrong variable.
 if u want to read variables from astersk with $AGI-get_variable() command
 then write the variable name as mentioned on voip-info site.

 so if u want to read extension then supplu variable name like
 $myno=$AGI-get_variable('EXTEN');
 hope u get it



 On Mon, Feb 23, 2009 at 1:14 PM, michel freiha mich...@gmail.com wrote:

 Dear Sir,

 Kindly note that the problem is on command  $AGI-get_variable('
 variablename');

 The AGI seems that it's not reading nothing from asterisk

 Regards


 On Mon, Feb 23, 2009 at 9:26 AM, Yawar Hadi yawarh...@gmail.com wrote:

 ohh got it...sorry for miss interpretation




 On Mon, Feb 23, 2009 at 12:23 PM, Yawar Hadi yawarh...@gmail.comwrote:

 How ?


 On Mon, Feb 23, 2009 at 12:09 PM, Steve Edwards asterisk.org@
 sedwards.com wrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  dear steve
any issue u havent replied.?

 You have me confused with michel freiha.

 Thanks in advance,

 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867
 PST
 Newline Fax:
 +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-23 Thread Steve Edwards
On Mon, 23 Feb 2009, michel freiha wrote:

 EXTEN is working fine and I can get the dialed number...Now suppose I 
 need to fetche the extension username from where I'm dialing...What is 
 the variable name here?Or where i can find Variables name...Can you give 
 me a link where these variables are defined?

Reading the directory where your Asterisk sources 
are/doc/README.variables (1.2) may help.

Also, voip-info.org and google.com can be useful.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-23 Thread Steve Edwards
On Mon, 23 Feb 2009, Yawar Hadi wrote:

 so if u want to read extension then supplu variable name like
 $myno=$AGI-get_variable('EXTEN');
 hope u get it

I think passing the variable on the command line is more flexible than a 
fixed variable, particularly the much more limiting ${EXTEN}.

My preference is to use the getopt_long function to parse the command 
line passed to the AGI. I find

exten = _x.,n,agi(dial,--customer-id=112)

to be more obvious than

exten = _x.,n,agi(dial,${EXTEN})

or

exten = 112,n,agi(dial)

This becomes even more obvious when you pass multiple variables:

exten = _x.,n,agi(dial\
,--announce=winter-specials\
,--customer-id=112\
,--caller-id=ACME Widgets Inc\
,--verbose\
,--record\
)

(line split for readability)

rather than

exten = _x.,n,agi(dial,112,,,winter-specials,ACME Widgets,v,,r)

or

exten = 112,n,agi(dial)

Particularly since getopt_long does not care about the order of the 
options.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-23 Thread michel freiha
Dear All,

I would really need to thank you all for the great help that I got here from
all of you and specially Mr. Yawar hadi for his great assist and
professionalism

Thanks

On Mon, Feb 23, 2009 at 6:48 PM, Steve Edwards asterisk@sedwards.comwrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  so if u want to read extension then supplu variable name like
  $myno=$AGI-get_variable('EXTEN');
  hope u get it

 I think passing the variable on the command line is more flexible than a
 fixed variable, particularly the much more limiting ${EXTEN}.

 My preference is to use the getopt_long function to parse the command
 line passed to the AGI. I find

exten = _x.,n,agi(dial,--customer-id=112)

 to be more obvious than

exten = _x.,n,agi(dial,${EXTEN})

 or

exten = 112,n,agi(dial)

 This becomes even more obvious when you pass multiple variables:

exten = _x.,n,agi(dial\
,--announce=winter-specials\
,--customer-id=112\
,--caller-id=ACME Widgets Inc\
,--verbose\
,--record\
)

 (line split for readability)

 rather than

exten = _x.,n,agi(dial,112,,,winter-specials,ACME Widgets,v,,r)

 or

exten = 112,n,agi(dial)

 Particularly since getopt_long does not care about the order of the
 options.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-23 Thread Yawar Hadi
,must visit this site for more info
http://www.voip-info.org/wiki-Asterisk+AGI

and also take help from google its a good source


On Tue, Feb 24, 2009 at 5:08 AM, michel freiha mich...@gmail.com wrote:

 Dear All,

 I would really need to thank you all for the great help that I got here
 from all of you and specially Mr. Yawar hadi for his great assist and
 professionalism

 Thanks


 On Mon, Feb 23, 2009 at 6:48 PM, Steve Edwards 
 asterisk@sedwards.comwrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  so if u want to read extension then supplu variable name like
  $myno=$AGI-get_variable('EXTEN');
  hope u get it

 I think passing the variable on the command line is more flexible than a
 fixed variable, particularly the much more limiting ${EXTEN}.

 My preference is to use the getopt_long function to parse the command
 line passed to the AGI. I find

exten = _x.,n,agi(dial,--customer-id=112)

 to be more obvious than

exten = _x.,n,agi(dial,${EXTEN})

 or

exten = 112,n,agi(dial)

 This becomes even more obvious when you pass multiple variables:

exten = _x.,n,agi(dial\
,--announce=winter-specials\
,--customer-id=112\
,--caller-id=ACME Widgets Inc\
,--verbose\
,--record\
)

 (line split for readability)

 rather than

exten = _x.,n,agi(dial,112,,,winter-specials,ACME Widgets,v,,r)

 or

exten = 112,n,agi(dial)

 Particularly since getopt_long does not care about the order of the
 options.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-22 Thread Yawar Hadi
dear steve
   any issue u havent replied.?

On Sat, Feb 21, 2009 at 6:17 PM, Luis Morales faston...@gmail.com wrote:

 Done,

 There is no problem to do it. Did you pay for this script or you need
 support to do it ?

 Have an nice day,

 Luis Morales.

 On Fri, Feb 20, 2009 at 7:24 PM, michel freiha mich...@gmail.com wrote:
  Dear Sir,
 
  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information
 
  Regards
 
  On Fri, Feb 20, 2009 at 1:38 AM, Luis Morales faston...@gmail.com
 wrote:
 
  Sure,
 
  what did you need exactly ?
 
 
  On Thu, Feb 19, 2009 at 6:57 PM, michel freiha mich...@gmail.com
 wrote:
   Dear All,
  
   I would like to ask please if someone has a AGI script that select a
   value
   from a database and dial this value as a destination number
  
   Regards
  
   ___
   -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  
   asterisk-users mailing list
   To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
  
 
 
 
  --
 
 
 -
  Luis Morales
  Consultor de Tecnologia
  Cel: +(58)416-4242091
 
 
 -
  Empieza por hacer lo necesario, luego lo que es posible... y de
  pronto estarás haciendo lo imposible
 
  Leonardo Da'Vinci
 
 
 -
 
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  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 --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 



 --

 -
 Luis Morales
 Consultor de Tecnologia
 Cel: +(58)416-4242091

 -
 Empieza por hacer lo necesario, luego lo que es posible... y de
 pronto estarás haciendo lo imposible

 Leonardo Da'Vinci

 -

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-22 Thread Steve Edwards
On Mon, 23 Feb 2009, Yawar Hadi wrote:

 dear steve
   any issue u havent replied.?

You have me confused with michel freiha.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-22 Thread michel freiha
Dear Yawar,

I need please some help from you regarding the script tha you already
provided to me...It seems that the perl script is not reading correctly
variables from asterisk server..Can you please help in that?

Regards

On Mon, Feb 23, 2009 at 8:28 AM, Yawar Hadi yawarh...@gmail.com wrote:

 dear steve
any issue u havent replied.?


 On Sat, Feb 21, 2009 at 6:17 PM, Luis Morales faston...@gmail.com wrote:

 Done,

 There is no problem to do it. Did you pay for this script or you need
 support to do it ?

 Have an nice day,

 Luis Morales.

 On Fri, Feb 20, 2009 at 7:24 PM, michel freiha mich...@gmail.com wrote:
  Dear Sir,
 
  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information
 
  Regards
 
  On Fri, Feb 20, 2009 at 1:38 AM, Luis Morales faston...@gmail.com
 wrote:
 
  Sure,
 
  what did you need exactly ?
 
 
  On Thu, Feb 19, 2009 at 6:57 PM, michel freiha mich...@gmail.com
 wrote:
   Dear All,
  
   I would like to ask please if someone has a AGI script that select a
   value
   from a database and dial this value as a destination number
  
   Regards
  
   ___
   -- Bandwidth and Colocation Provided by http://www.api-digital.com--
  
   asterisk-users mailing list
   To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
  
 
 
 
  --
 
 
 -
  Luis Morales
  Consultor de Tecnologia
  Cel: +(58)416-4242091
 
 
 -
  Empieza por hacer lo necesario, luego lo que es posible... y de
  pronto estarás haciendo lo imposible
 
  Leonardo Da'Vinci
 
 
 -
 
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  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 --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 



 --

 -
 Luis Morales
 Consultor de Tecnologia
 Cel: +(58)416-4242091

 -
 Empieza por hacer lo necesario, luego lo que es posible... y de
 pronto estarás haciendo lo imposible

 Leonardo Da'Vinci

 -

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-22 Thread Yawar Hadi
How ?

On Mon, Feb 23, 2009 at 12:09 PM, Steve Edwards
asterisk@sedwards.comwrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  dear steve
any issue u havent replied.?

 You have me confused with michel freiha.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-22 Thread Yawar Hadi
ohh got it...sorry for miss interpretation



On Mon, Feb 23, 2009 at 12:23 PM, Yawar Hadi yawarh...@gmail.com wrote:

 How ?


 On Mon, Feb 23, 2009 at 12:09 PM, Steve Edwards asterisk@sedwards.com
  wrote:

 On Mon, 23 Feb 2009, Yawar Hadi wrote:

  dear steve
any issue u havent replied.?

 You have me confused with michel freiha.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-22 Thread Yawar Hadi
Sure, can u plz point out where script is not reading variables
correctly.from  commnad line argument or from command
$AGI-get_variable('variablename');

feel free to coneect.
u can add me on msn
yawarh...@hotmail.com

bye

On Mon, Feb 23, 2009 at 12:22 PM, michel freiha mich...@gmail.com wrote:

 Dear Yawar,

 I need please some help from you regarding the script tha you already
 provided to me...It seems that the perl script is not reading correctly
 variables from asterisk server..Can you please help in that?

 Regards

 On Mon, Feb 23, 2009 at 8:28 AM, Yawar Hadi yawarh...@gmail.com wrote:

 dear steve
any issue u havent replied.?


 On Sat, Feb 21, 2009 at 6:17 PM, Luis Morales faston...@gmail.comwrote:

 Done,

 There is no problem to do it. Did you pay for this script or you need
 support to do it ?

 Have an nice day,

 Luis Morales.

 On Fri, Feb 20, 2009 at 7:24 PM, michel freiha mich...@gmail.com
 wrote:
  Dear Sir,
 
  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the
 database and
  see if this number (112) is registered in a specific table...If yes,
 AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information
 
  Regards
 
  On Fri, Feb 20, 2009 at 1:38 AM, Luis Morales faston...@gmail.com
 wrote:
 
  Sure,
 
  what did you need exactly ?
 
 
  On Thu, Feb 19, 2009 at 6:57 PM, michel freiha mich...@gmail.com
 wrote:
   Dear All,
  
   I would like to ask please if someone has a AGI script that select a
   value
   from a database and dial this value as a destination number
  
   Regards
  
   ___
   -- Bandwidth and Colocation Provided by http://www.api-digital.com--
  
   asterisk-users mailing list
   To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
  
 
 
 
  --
 
 
 -
  Luis Morales
  Consultor de Tecnologia
  Cel: +(58)416-4242091
 
 
 -
  Empieza por hacer lo necesario, luego lo que es posible... y de
  pronto estarás haciendo lo imposible
 
  Leonardo Da'Vinci
 
 
 -
 
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  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 --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 



 --

 -
 Luis Morales
 Consultor de Tecnologia
 Cel: +(58)416-4242091

 -
 Empieza por hacer lo necesario, luego lo que es posible... y de
 pronto estarás haciendo lo imposible

 Leonardo Da'Vinci

 -

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-21 Thread michel freiha
Dear yawar,

Can you help in that please one more time in order to finish the issue?

Thanks a lot

Regards

On Sat, Feb 21, 2009 at 9:51 AM, Yawar Hadi yawarh...@gmail.com wrote:

 sure shift not pressed.
 it #!/usr/bin/perl


 On Sat, Feb 21, 2009 at 12:43 PM, Darren Murphy dar...@victoriajd.comwrote:

 sorry to but in, but...

 1  on first line make sure it is  3!/usr/perl/bin   not
 #!/user/perl/bin

 I'd suggest instead: #!/usr/bin/perl

 ;)

 2009/2/21 Yawar Hadi yawarh...@gmail.com

 hi steve,

 plz make some cahnges and now i have tested it its working fine to me

 1  on first line make sure it is  3!/usr/perl/bin   not
 #!/user/perl/bin
 2 change reading variable from get command to argument as

  #$no1=$AGI-get_variable('callerid');
  $no1=$ARGV[0];

 and where u calling scrip cahnge it  like   exten
 =112,1,AGI(Dial.pl|${EXTEN});

 hope it will work for u if any problem then reply me ..
 i think we have time difference so thats way i quit when u replied .


 On Sat, Feb 21, 2009 at 11:17 AM, Yawar Hadi yawarh...@gmail.comwrote:

 hi,
   Steve i just loged in and go through all replies.
 yes its mistakenly written as user instead of /user   on first line let
 be go through the problem of not reading the vairable and reply back to you
 soon.
 wait and dont lose your interest .this is the way to learn some thing
 new .wait let me to check it ...


 On Sat, Feb 21, 2009 at 5:09 AM, Steve Edwards asterisk.org@
 sedwards.com wrote:

 On Sat, 21 Feb 2009, michel freiha wrote:

  the script is running smoothly but it seems that it's not reading
  variables correctly fro asterisk as you can see below:

 Maybe the original author would care to step in? I seem to have lost
 interest.

 Thanks in advance,

 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867
 PST
 Newline Fax:
 +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-21 Thread Luis Morales
Done,

There is no problem to do it. Did you pay for this script or you need
support to do it ?

Have an nice day,

Luis Morales.

On Fri, Feb 20, 2009 at 7:24 PM, michel freiha mich...@gmail.com wrote:
 Dear Sir,

 I need the followingA customer will dial a specific number like 112,this
 will fire a php AGI script...The AGI script will connect to the database and
 see if this number (112) is registered in a specific table...If yes, AGI
 script will return to asterisk a destination number registered in that table
 and match the 112 then asterisk will dial out the number fetched

 Please let me know if you need any other information

 Regards

 On Fri, Feb 20, 2009 at 1:38 AM, Luis Morales faston...@gmail.com wrote:

 Sure,

 what did you need exactly ?


 On Thu, Feb 19, 2009 at 6:57 PM, michel freiha mich...@gmail.com wrote:
  Dear All,
 
  I would like to ask please if someone has a AGI script that select a
  value
  from a database and dial this value as a destination number
 
  Regards
 
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 



 --

 -
 Luis Morales
 Consultor de Tecnologia
 Cel: +(58)416-4242091

 -
 Empieza por hacer lo necesario, luego lo que es posible... y de
 pronto estarás haciendo lo imposible

 Leonardo Da'Vinci

 -

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




-- 
-
Luis Morales
Consultor de Tecnologia
Cel: +(58)416-4242091
-
Empieza por hacer lo necesario, luego lo que es posible... y de
pronto estarás haciendo lo imposible

Leonardo Da'Vinci
-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear Yawar,

I'll appreciate a lot if you send to me these scripts in order to test

Regards

On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i have in perl AGI script if u want then let me know ...?


 On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards 
 asterisk@sedwards.comwrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Yawar Hadi
okay
this is the dial plan u can test it and let me know if u want more
information ...
and script is attached.

exten=112,1,AGI(DialNumber.pl|${EXTEN});
exten=112,2,Dial(SIP/Terminator/${DestNo}|);
exten=112,3,Hangup();

on second in place of termeinator u have to use the ip of terminator to
which u r sending ur traffic.if u want to call sip sip of from one soft
phone to second soft phone then remoce /terminator ok... like
(SIP/${DestNo})

mail be back if any problem.

On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

 Dear Yawar,

 I'll appreciate a lot if you send to me these scripts in order to test

 Regards

 On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i have in perl AGI script if u want then let me know ...?


 On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.com
  wrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the
 database and
  see if this number (112) is registered in a specific table...If yes,
 AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)


DialNumber.pl
Description: Perl program
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Fri, 20 Feb 2009, Yawar Hadi wrote:

 this is the dial plan u can test it and let me know if u want more 
 information ... and script is attached.

 exten=112,1,AGI(DialNumber.pl|${EXTEN});

You pass ${EXTEN} but you use $AGI-get_variable('extension') in your 
script.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear Sir,

I'm facing the below problem:

-- Executing [...@did:1] AGI(SIP/123456-08f44c00, dial.pl|112) in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
  ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl': No
such file or directory
  == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'

The file dial.pl is already created and exist in the correct location as you
can see below:

[r...@switch1 agi-bin]# ls
agi-test.agi  ani.agi  dial.pl  directory.agi  eagi-sphinx-test  eagi-test
helloworld.php  jukebox.agi  micho.php  my_agi.log
[r...@switch1 agi-bin]# pwd
/var/lib/asterisk/agi-bin
[r...@switch1 agi-bin]#

What could be the issue here?

Thanks a lot for help

On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi yawarh...@gmail.com wrote:

 okay
 this is the dial plan u can test it and let me know if u want more
 information ...
 and script is attached.

 exten=112,1,AGI(DialNumber.pl|${EXTEN});
 exten=112,2,Dial(SIP/Terminator/${DestNo}|);
 exten=112,3,Hangup();

 on second in place of termeinator u have to use the ip of terminator to
 which u r sending ur traffic.if u want to call sip sip of from one soft
 phone to second soft phone then remoce /terminator ok... like
 (SIP/${DestNo})

 mail be back if any problem.


 On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

 Dear Yawar,

 I'll appreciate a lot if you send to me these scripts in order to test

 Regards

 On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i have in perl AGI script if u want then let me know ...?


 On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk.org@
 sedwards.com wrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the
 database and
  see if this number (112) is registered in a specific table...If yes,
 AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867
 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Danny Nicholas
Dial.pl is 

1.  executable
2.  owned by asterisk
3.  passed perl syntax (perl -wc dial.pl)

 

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of michel freiha
Sent: Friday, February 20, 2009 1:41 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI script

 

Dear Sir,

I'm facing the below problem:

-- Executing [...@did:1] AGI(SIP/123456-08f44c00, dial.pl|112) in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
  ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl': No
such file or directory
  == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'

The file dial.pl is already created and exist in the correct location as you
can see below:

[r...@switch1 agi-bin]# ls
agi-test.agi  ani.agi  dial.pl  directory.agi  eagi-sphinx-test  eagi-test
helloworld.php  jukebox.agi  micho.php  my_agi.log
[r...@switch1 agi-bin]# pwd
/var/lib/asterisk/agi-bin
[r...@switch1 agi-bin]# 

What could be the issue here?

Thanks a lot for help

On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi yawarh...@gmail.com wrote:

okay 
this is the dial plan u can test it and let me know if u want more
information ...
and script is attached.

exten=112,1,AGI(DialNumber.pl|${EXTEN});
exten=112,2,Dial(SIP/Terminator/${DestNo}|);
exten=112,3,Hangup();

on second in place of termeinator u have to use the ip of terminator to
which u r sending ur traffic.if u want to call sip sip of from one soft
phone to second soft phone then remoce /terminator ok... like
(SIP/${DestNo})

mail be back if any problem.

 

On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

Dear Yawar,

I'll appreciate a lot if you send to me these scripts in order to test

Regards

On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

i have in perl AGI script if u want then let me know ...?

 

On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.com
wrote:

On Fri, 20 Feb 2009, michel freiha wrote:

 I need the followingA customer will dial a specific number like
112,this
 will fire a php AGI script...The AGI script will connect to the database
and
 see if this number (112) is registered in a specific table...If yes, AGI
 script will return to asterisk a destination number registered in that
table
 and match the 112 then asterisk will dial out the number fetched

 Please let me know if you need any other information

1) How much are you paying for us to do your work?

2) Shouldn't this be on -biz?

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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





-- 
Best regards 

Yawar Hadi Noshahi
 QAU Islamabad 
(+92-0300-5504798)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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 --

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




-- 
Best regards 

Yawar Hadi Noshahi
 QAU Islamabad 
(+92-0300-5504798)


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Fri, 20 Feb 2009, Danny Nicholas wrote:

 Dial.pl is

 1.executable
 2.owned by asterisk

1  2 should be Can be executed by the user running Asterisk.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread Danny Nicholas
Are you sure you don't have p1 instead of pl in your dialplan?

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Friday, February 20, 2009 2:06 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI script

On Fri, 20 Feb 2009, Danny Nicholas wrote:

 Dial.pl is

 1.executable
 2.owned by asterisk

1  2 should be Can be executed by the user running Asterisk.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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 --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear Sir,

The file dial.pl is executable and own by root as you can see below

ls -lrt
total 296
-rwxr-xr-x 1 root root   1339 Feb 15 23:26 helloworld.php
-rw-r--r-- 1 root root  0 Feb 15 23:26 my_agi.log
-rw-r--r-- 1 root root   1250 Feb 17 23:35 ani.agi
-rwxrwxrwx 1 root root   1604 Feb 20 00:57 micho.php
-rwxrwxrwx 1 root root   3874 Feb 20 01:37 directory.agi
-rwxr-xr-x 1 root root  14530 Feb 20 16:43 jukebox.agi
-rwxr-xr-x 1 root root 117743 Feb 20 16:43 eagi-test
-rwxr-xr-x 1 root root  90971 Feb 20 16:43 eagi-sphinx-test
-rwxr-xr-x 1 root root   1742 Feb 20 16:43 agi-test.agi
-rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

Regarding the script debug test please find below what did I get:

[r...@switch1 agi-bin]# /usr/bin/perl -wc dial.pl
Can't locate Asterisk/AGI.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at dial.pl line 6.
BEGIN failed--compilation aborted at dial.pl line 6.
[r...@switch1 agi-bin]#

Really appreciate your help

Regards

On Fri, Feb 20, 2009 at 9:44 PM, Danny Nicholas da...@debsinc.com wrote:

  Dial.pl is

1. executable
2. owned by asterisk
3. passed perl syntax (perl –wc dial.pl)


  --

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *michel freiha
 *Sent:* Friday, February 20, 2009 1:41 PM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* Re: [asterisk-users] AGI script



 Dear Sir,

 I'm facing the below problem:

 -- Executing [...@did:1] AGI(SIP/123456-08f44c00, dial.pl|112) in new
 stack
 -- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
   ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl':
 No such file or directory
   == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'

 The file dial.pl is already created and exist in the correct location as
 you can see below:

 [r...@switch1 agi-bin]# ls
 agi-test.agi  ani.agi  dial.pl  directory.agi  eagi-sphinx-test  eagi-test
 helloworld.php  jukebox.agi  micho.php  my_agi.log
 [r...@switch1 agi-bin]# pwd
 /var/lib/asterisk/agi-bin
 [r...@switch1 agi-bin]#

 What could be the issue here?

 Thanks a lot for help

 On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi yawarh...@gmail.com wrote:

 okay
 this is the dial plan u can test it and let me know if u want more
 information ...
 and script is attached.

 exten=112,1,AGI(DialNumber.pl|${EXTEN});
 exten=112,2,Dial(SIP/Terminator/${DestNo}|);
 exten=112,3,Hangup();

 on second in place of termeinator u have to use the ip of terminator to
 which u r sending ur traffic.if u want to call sip sip of from one soft
 phone to second soft phone then remoce /terminator ok... like
 (SIP/${DestNo})

 mail be back if any problem.



 On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

 Dear Yawar,

 I'll appreciate a lot if you send to me these scripts in order to test

 Regards

 On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i have in perl AGI script if u want then let me know ...?



 On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.com
 wrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http

Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Kindly note that at line 6 I have:

se Asterisk::AGI;

Regards

On Fri, Feb 20, 2009 at 9:44 PM, Danny Nicholas da...@debsinc.com wrote:

  Dial.pl is

1. executable
2. owned by asterisk
3. passed perl syntax (perl –wc dial.pl)


  --

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *michel freiha
 *Sent:* Friday, February 20, 2009 1:41 PM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* Re: [asterisk-users] AGI script



 Dear Sir,

 I'm facing the below problem:

 -- Executing [...@did:1] AGI(SIP/123456-08f44c00, dial.pl|112) in new
 stack
 -- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
   ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl':
 No such file or directory
   == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'

 The file dial.pl is already created and exist in the correct location as
 you can see below:

 [r...@switch1 agi-bin]# ls
 agi-test.agi  ani.agi  dial.pl  directory.agi  eagi-sphinx-test  eagi-test
 helloworld.php  jukebox.agi  micho.php  my_agi.log
 [r...@switch1 agi-bin]# pwd
 /var/lib/asterisk/agi-bin
 [r...@switch1 agi-bin]#

 What could be the issue here?

 Thanks a lot for help

 On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi yawarh...@gmail.com wrote:

 okay
 this is the dial plan u can test it and let me know if u want more
 information ...
 and script is attached.

 exten=112,1,AGI(DialNumber.pl|${EXTEN});
 exten=112,2,Dial(SIP/Terminator/${DestNo}|);
 exten=112,3,Hangup();

 on second in place of termeinator u have to use the ip of terminator to
 which u r sending ur traffic.if u want to call sip sip of from one soft
 phone to second soft phone then remoce /terminator ok... like
 (SIP/${DestNo})

 mail be back if any problem.



 On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

 Dear Yawar,

 I'll appreciate a lot if you send to me these scripts in order to test

 Regards

 On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i have in perl AGI script if u want then let me know ...?



 On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.com
 wrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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



   --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Sorry, it's
use Asterisk::AGI;

On Fri, Feb 20, 2009 at 10:13 PM, michel freiha mich...@gmail.com wrote:

 Kindly note that at line 6 I have:

 se Asterisk::AGI;

 Regards

 On Fri, Feb 20, 2009 at 9:44 PM, Danny Nicholas da...@debsinc.com wrote:

  Dial.pl is

1. executable
2. owned by asterisk
3. passed perl syntax (perl –wc dial.pl)


  --

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *michel freiha
 *Sent:* Friday, February 20, 2009 1:41 PM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* Re: [asterisk-users] AGI script



 Dear Sir,

 I'm facing the below problem:

 -- Executing [...@did:1] AGI(SIP/123456-08f44c00, dial.pl|112) in new
 stack
 -- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
   ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl':
 No such file or directory
   == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'

 The file dial.pl is already created and exist in the correct location as
 you can see below:

 [r...@switch1 agi-bin]# ls
 agi-test.agi  ani.agi  dial.pl  directory.agi  eagi-sphinx-test
 eagi-test  helloworld.php  jukebox.agi  micho.php  my_agi.log
 [r...@switch1 agi-bin]# pwd
 /var/lib/asterisk/agi-bin
 [r...@switch1 agi-bin]#

 What could be the issue here?

 Thanks a lot for help

 On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi yawarh...@gmail.com wrote:

 okay
 this is the dial plan u can test it and let me know if u want more
 information ...
 and script is attached.

 exten=112,1,AGI(DialNumber.pl|${EXTEN});
 exten=112,2,Dial(SIP/Terminator/${DestNo}|);
 exten=112,3,Hangup();

 on second in place of termeinator u have to use the ip of terminator to
 which u r sending ur traffic.if u want to call sip sip of from one soft
 phone to second soft phone then remoce /terminator ok... like
 (SIP/${DestNo})

 mail be back if any problem.



 On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

 Dear Yawar,

 I'll appreciate a lot if you send to me these scripts in order to test

 Regards

 On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

 i have in perl AGI script if u want then let me know ...?



 On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.com
 wrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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



   --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Fri, 20 Feb 2009, michel freiha wrote:

 I'm facing the below problem:
  ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl': No
 such file or directory

 What could be the issue here?

These commands may point you in the right direction:

1) ps -aef | grep asterisk | grep -v grep

2) ls -l /var/lib/asterisk/agi-bin/dial.pl

3) head -1 /var/lib/asterisk/agi-bin/dial.pl

Also, note that you copied the example dialplan snippet verbatim. The 
script as provided does not look at the passed extension, it looks at 
the AGI environment variable.

A suggestion -- you should not be logging in as root. You should be using 
the sudo command.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Fri, 20 Feb 2009, michel freiha wrote:

 The file dial.pl is executable and own by root as you can see below

 ls -lrt
 -rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

Using the very large hammer (AKA chmod 777) to solve 
permissions problems indicates a very large gap in understanding the 
implications.

Think about what the following command executed by any user on your system 
would do:

echo rm --force --recursive / dial.pl

 Regarding the script debug test please find below what did I get:

 [r...@switch1 agi-bin]# /usr/bin/perl -wc dial.pl
 Can't locate Asterisk/AGI.pm in @INC (@INC contains:

So now you have identified your problem -- you haven't satisfied the 
prerequisites for the script.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread Danny Nicholas
You will need to download AGI from www.cpan.org http://www.cpan.org/  and
install it.  Here it is in simple steps

 

Cd /usr/src

Wget
http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar.
gz

Tar xvf asterisk-perl-0.10.tar.gz

Cd asterisk-perl-0.10

Make  make install

 

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of michel freiha
Sent: Friday, February 20, 2009 2:12 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI script

 

Dear Sir,

The file dial.pl is executable and own by root as you can see below

ls -lrt
total 296
-rwxr-xr-x 1 root root   1339 Feb 15 23:26 helloworld.php
-rw-r--r-- 1 root root  0 Feb 15 23:26 my_agi.log
-rw-r--r-- 1 root root   1250 Feb 17 23:35 ani.agi
-rwxrwxrwx 1 root root   1604 Feb 20 00:57 micho.php
-rwxrwxrwx 1 root root   3874 Feb 20 01:37 directory.agi
-rwxr-xr-x 1 root root  14530 Feb 20 16:43 jukebox.agi
-rwxr-xr-x 1 root root 117743 Feb 20 16:43 eagi-test
-rwxr-xr-x 1 root root  90971 Feb 20 16:43 eagi-sphinx-test
-rwxr-xr-x 1 root root   1742 Feb 20 16:43 agi-test.agi
-rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

Regarding the script debug test please find below what did I get:

[r...@switch1 agi-bin]# /usr/bin/perl -wc dial.pl
Can't locate Asterisk/AGI.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at dial.pl line 6.
BEGIN failed--compilation aborted at dial.pl line 6.
[r...@switch1 agi-bin]# 

Really appreciate your help

Regards

On Fri, Feb 20, 2009 at 9:44 PM, Danny Nicholas da...@debsinc.com wrote:

Dial.pl is 

1.  executable
2.  owned by asterisk
3.  passed perl syntax (perl -wc dial.pl)

 

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of michel freiha
Sent: Friday, February 20, 2009 1:41 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI script

 

Dear Sir,

I'm facing the below problem:

-- Executing [...@did:1] AGI(SIP/123456-08f44c00, dial.pl|112) in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
  ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl': No
such file or directory
  == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'

The file dial.pl is already created and exist in the correct location as you
can see below:

[r...@switch1 agi-bin]# ls
agi-test.agi  ani.agi  dial.pl  directory.agi  eagi-sphinx-test  eagi-test
helloworld.php  jukebox.agi  micho.php  my_agi.log
[r...@switch1 agi-bin]# pwd
/var/lib/asterisk/agi-bin
[r...@switch1 agi-bin]# 

What could be the issue here?

Thanks a lot for help

On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi yawarh...@gmail.com wrote:

okay 
this is the dial plan u can test it and let me know if u want more
information ...
and script is attached.

exten=112,1,AGI(DialNumber.pl|${EXTEN});
exten=112,2,Dial(SIP/Terminator/${DestNo}|);
exten=112,3,Hangup();

on second in place of termeinator u have to use the ip of terminator to
which u r sending ur traffic.if u want to call sip sip of from one soft
phone to second soft phone then remoce /terminator ok... like
(SIP/${DestNo})

mail be back if any problem.

 

On Fri, Feb 20, 2009 at 1:07 PM, michel freiha mich...@gmail.com wrote:

Dear Yawar,

I'll appreciate a lot if you send to me these scripts in order to test

Regards

On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi yawarh...@gmail.com wrote:

i have in perl AGI script if u want then let me know ...?

 

On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.com
wrote:

On Fri, 20 Feb 2009, michel freiha wrote:

 I need the followingA customer will dial a specific number like
112,this
 will fire a php AGI script...The AGI script will connect to the database
and
 see if this number (112) is registered in a specific table...If yes, AGI
 script will return to asterisk a destination number registered in that
table
 and match the 112 then asterisk will dial out the number fetched

 Please let me know if you need any other information

1) How much are you paying for us to do your

Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Fri, 20 Feb 2009, Danny Nicholas wrote:

 You will need to download AGI from www.cpan.org http://www.cpan.org/  and
 install it.  Here it is in simple steps

 Cd /usr/src

 Wget
 http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar.
 gz

 Tar xvf asterisk-perl-0.10.tar.gz

 Cd asterisk-perl-0.10

 Make  make install

Maybe not simple enough :)

The first letter of each command should not be capitalized.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear All,

Please find below my dialplan:
[did]
exten=112,1,AGI(dial.pl|${EXTEN});
exten = 112,1,Dial(SIP/${dest...@80.169.210.181 destno...@80.169.210.181
,60)
exten=112,3,Hangup();

And below are commands results sent by steve:

[r...@switch1 ~]# sudo su
[r...@switch1 ~]# /etc/init.d/asterisk restart
Shutting down asterisk: [  OK  ]
Starting asterisk: [  OK  ]
[r...@switch1 ~]# ps -aef | grep asterisk | grep -v grep
root 10470 1  0 22:18 pts/000:00:00 /bin/sh
/usr/sbin/safe_asterisk
root 10473 10470  0 22:18 pts/000:00:00 /usr/sbin/asterisk -f -vvvg
-c
[r...@switch1 ~]# ls -l /var/lib/asterisk/agi-bin/dial.pl
-rwxrwxrwx 1 root root 1865 Feb 20 21:18 /var/lib/asterisk/agi-bin/dial.pl
[r...@switch1 ~]# head -1 /var/lib/asterisk/agi-bin/dial.pl
#!user/bin/perl


The file dial.pl is executable as you can see below:

-rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

Regards

On Fri, Feb 20, 2009 at 10:15 PM, Steve Edwards
asterisk@sedwards.comwrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I'm facing the below problem:
   ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl':
 No
  such file or directory
 
  What could be the issue here?

 These commands may point you in the right direction:

 1) ps -aef | grep asterisk | grep -v grep

 2) ls -l /var/lib/asterisk/agi-bin/dial.pl

 3) head -1 /var/lib/asterisk/agi-bin/dial.pl

 Also, note that you copied the example dialplan snippet verbatim. The
 script as provided does not look at the passed extension, it looks at
 the AGI environment variable.

 A suggestion -- you should not be logging in as root. You should be using
 the sudo command.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Danny Nicholas
That's Mr. Gates fault (outlook supplied the Caps) :)

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Friday, February 20, 2009 2:50 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AGI script

On Fri, 20 Feb 2009, Danny Nicholas wrote:

 You will need to download AGI from www.cpan.org http://www.cpan.org/
and
 install it.  Here it is in simple steps

 Cd /usr/src

 Wget

http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar.
 gz

 Tar xvf asterisk-perl-0.10.tar.gz

 Cd asterisk-perl-0.10

 Make  make install

Maybe not simple enough :)

The first letter of each command should not be capitalized.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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 --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear Sir,

I was just trying to find the solution...Now I give the file 755 to dial.pl

Kindly note if I run the script from shell using sudo everything looks
greate as below:
sudo /var/lib/asterisk/agi-bin/dial.pl
sudo: unable to execute /var/lib/asterisk/agi-bin/dial.pl: Success

Any suggestions?

Thanks

On Fri, Feb 20, 2009 at 10:23 PM, Steve Edwards
asterisk@sedwards.comwrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  The file dial.pl is executable and own by root as you can see below
 
  ls -lrt
  -rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

 Using the very large hammer (AKA chmod 777) to solve
 permissions problems indicates a very large gap in understanding the
 implications.

 Think about what the following command executed by any user on your system
 would do:

echo rm --force --recursive / dial.pl

  Regarding the script debug test please find below what did I get:
 
  [r...@switch1 agi-bin]# /usr/bin/perl -wc dial.pl
  Can't locate Asterisk/AGI.pm in @INC (@INC contains:

 So now you have identified your problem -- you haven't satisfied the
 prerequisites for the script.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Tzafrir Cohen
On Fri, Feb 20, 2009 at 02:36:57PM -0600, Danny Nicholas wrote:
 You will need to download AGI from www.cpan.org http://www.cpan.org/  and
 install it.  Here it is in simple steps

Or use standard CPAN packages installation method (which would simplify
things if you don't have one of its dependencies isntalled).

Or install the package from your distro.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Fri, 20 Feb 2009, michel freiha wrote:

 Please find below my dialplan:
 [did]
 exten=112,1,AGI(dial.pl|${EXTEN});

You are still passing ${EXTEN} which is ignored by the script.

 [r...@switch1 ~]# sudo su

This does nothing useful. Your posts demonstrate a lack of understanding 
and experience with the concepts and commands of Linux. Thus, logging in 
as root or creating a root shell using sudo or su is exceptionally 
dangerous.

I've been doing this cruft (Unix/Linux) for over 30 years and I rarely log 
in as root or create a root shell -- it's just not worth the risk. It's 
all too easy to be typing quickly and mistype a space in the wrong place 
in a command such as rm *~ and then wonder what the hell happened.

You should use the sudo command to execute a single command and only 
when actually needed. For example, the typical install from source 
command sequence is:

wget ...
tar -xvzf ...
cd ...
make
make install

Only the last command needs elevated privileges.

Unless you are playing with Asterisk for the learning experience, you 
are in over your head and should consider investing some time in learning 
the basics.

 [r...@switch1 ~]# ps -aef | grep asterisk | grep -v grep
 root 10470 1  0 22:18 pts/000:00:00 /bin/sh 
 /usr/sbin/safe_asterisk
 root 10473 10470  0 22:18 pts/000:00:00 /usr/sbin/asterisk -f -vvvg -c

Running Asterisk as root is a bad idea -- but most people do it.

 [r...@switch1 ~]# ls -l /var/lib/asterisk/agi-bin/dial.pl
 -rwxrwxrwx 1 root root 1865 Feb 20 21:18 /var/lib/asterisk/agi-bin/dial.pl

At a minimum, please chmod go-w /var/lib/asterisk/agi-bin/dial.pl and 
then read the man page for chmod to understand what you just did.

 [r...@switch1 ~]# head -1 /var/lib/asterisk/agi-bin/dial.pl
 #!user/bin/perl

 The file dial.pl is executable as you can see below:

 -rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

The source of your problem (missing the prerequisites for the script) have 
been identified and Danny has provided the steps.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread Kai-Uwe Jensen

 Kindly note if I run the script from shell using sudo everything looks
 greate as below:
 sudo /var/lib/asterisk/agi-bin/dial.pl
 sudo: unable to execute /var/lib/asterisk/agi-bin/dial.pl: Success


Please read that command output again. It may not be as great as you think.
unable to execute. hmmh.

Have you installed Perl on your systerm? Do you have it installed in the
same location that the script expects it? Do you know how to check that?
(hint: look at the first line of your script, the one starting with #!. I
would expect it to contain the full path to your perl interpreter. Make sure
that path is correct. Do not modify any commandline arguments that may also
be specified in the script header.)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Tilghman Lesher
On Friday 20 February 2009 14:36:57 Danny Nicholas wrote:
 You will need to download AGI from www.cpan.org http://www.cpan.org/  and
 install it.  Here it is in simple steps



 Cd /usr/src

 Wget
 http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar
. gz

 Tar xvf asterisk-perl-0.10.tar.gz

 Cd asterisk-perl-0.10

 Make  make install

Even easier:

perl -MCPAN -e'install Asterisk::AGI'

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear Kai,

If I change directory to /usr/bin and type the following command I got:

[r...@switch1 bin]# ./perl /var/lib/asterisk/agi-bin/dial.pl

VERBOSE AGI Environment Dump: 3

GET VARIABLE extension

VERBOSE my dialed no is :

VERBOSE Query is:SELECT  dst_nb FROM test where extension = ''

SET VARIABLE DestNo

Regards

On Fri, Feb 20, 2009 at 11:44 PM, Tilghman Lesher 
tilgh...@mail.jeffandtilghman.com wrote:

 On Friday 20 February 2009 14:36:57 Danny Nicholas wrote:
  You will need to download AGI from www.cpan.org http://www.cpan.org/
  and
  install it.  Here it is in simple steps
 
 
 
  Cd /usr/src
 
  Wget
 
 http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar
 . gz
 
  Tar xvf asterisk-perl-0.10.tar.gz
 
  Cd asterisk-perl-0.10
 
  Make  make install

 Even easier:

 perl -MCPAN -e'install Asterisk::AGI'

 --
 Tilghman

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear All,

i found the issue...it was just the #!/user/bin/perl instead of
#!user/bin/perl

Thanks a lot for all help

Regards
On Fri, Feb 20, 2009 at 11:58 PM, michel freiha mich...@gmail.com wrote:

 Dear Kai,

 If I change directory to /usr/bin and type the following command I got:

 [r...@switch1 bin]# ./perl /var/lib/asterisk/agi-bin/dial.pl

 VERBOSE AGI Environment Dump: 3

 GET VARIABLE extension

 VERBOSE my dialed no is :

 VERBOSE Query is:SELECT  dst_nb FROM test where extension = ''

 SET VARIABLE DestNo

 Regards


 On Fri, Feb 20, 2009 at 11:44 PM, Tilghman Lesher 
 tilgh...@mail.jeffandtilghman.com wrote:

 On Friday 20 February 2009 14:36:57 Danny Nicholas wrote:
  You will need to download AGI from www.cpan.org http://www.cpan.org/
  and
  install it.  Here it is in simple steps
 
 
 
  Cd /usr/src
 
  Wget
 
 http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar
 . gz
 
  Tar xvf asterisk-perl-0.10.tar.gz
 
  Cd asterisk-perl-0.10
 
  Make  make install

 Even easier:

 perl -MCPAN -e'install Asterisk::AGI'

 --
 Tilghman

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread michel freiha
Dear All,

the script is running smoothly but it seems that it's not reading variables
correctly fro asterisk as you can see below:

 Executing [...@did:1] AGI(SIP/123456-b7e03650, dial.agi|112) in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dial.agi
--  dial.agi|112: AGI Environment Dump:
--  dial.agi|112:  -- accountcode = 10
--  dial.agi|112:  -- callerid = 123456
--  dial.agi|112:  -- calleridname = AS1
--  dial.agi|112:  -- callingani2 = 0
--  dial.agi|112:  -- callingpres = 0
--  dial.agi|112:  -- callingtns = 0
--  dial.agi|112:  -- callington = 0
--  dial.agi|112:  -- channel = SIP/123456-b7e03650
--  dial.agi|112:  -- context = did
--  dial.agi|112:  -- dnid = 112
--  dial.agi|112:  -- enhanced = 0.0
--  dial.agi|112:  -- extension = 112
--  dial.agi|112:  -- language = en
--  dial.agi|112:  -- priority = 1
--  dial.agi|112:  -- rdnis = unknown
--  dial.agi|112:  -- request = dial.agi
--  dial.agi|112:  -- type = SIP
--  dial.agi|112:  -- uniqueid = ergatel.net-1235170972.16
  dial.agi|112: my dialed no is :
  dial.agi|112: Query is:SELECT  dst_nb FROM test where extension = ''

regards

On Sat, Feb 21, 2009 at 12:06 AM, michel freiha mich...@gmail.com wrote:

 Dear All,

 i found the issue...it was just the #!/user/bin/perl instead of
 #!user/bin/perl

 Thanks a lot for all help

 Regards

 On Fri, Feb 20, 2009 at 11:58 PM, michel freiha mich...@gmail.com wrote:

 Dear Kai,

 If I change directory to /usr/bin and type the following command I got:

 [r...@switch1 bin]# ./perl /var/lib/asterisk/agi-bin/dial.pl

 VERBOSE AGI Environment Dump: 3

 GET VARIABLE extension

 VERBOSE my dialed no is :

 VERBOSE Query is:SELECT  dst_nb FROM test where extension = ''

 SET VARIABLE DestNo

 Regards


 On Fri, Feb 20, 2009 at 11:44 PM, Tilghman Lesher 
 tilgh...@mail.jeffandtilghman.com wrote:

 On Friday 20 February 2009 14:36:57 Danny Nicholas wrote:
  You will need to download AGI from www.cpan.org http://www.cpan.org/
  and
  install it.  Here it is in simple steps
 
 
 
  Cd /usr/src
 
  Wget
 
 http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar
 . gz
 
  Tar xvf asterisk-perl-0.10.tar.gz
 
  Cd asterisk-perl-0.10
 
  Make  make install

 Even easier:

 perl -MCPAN -e'install Asterisk::AGI'

 --
 Tilghman

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Steve Edwards
On Sat, 21 Feb 2009, michel freiha wrote:

 the script is running smoothly but it seems that it's not reading 
 variables correctly fro asterisk as you can see below:

Maybe the original author would care to step in? I seem to have lost 
interest.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-20 Thread Yawar Hadi
hi,
  Steve i just loged in and go through all replies.
yes its mistakenly written as user instead of /user   on first line let be
go through the problem of not reading the vairable and reply back to you
soon.
wait and dont lose your interest .this is the way to learn some thing new
.wait let me to check it ...

On Sat, Feb 21, 2009 at 5:09 AM, Steve Edwards asterisk@sedwards.comwrote:

 On Sat, 21 Feb 2009, michel freiha wrote:

  the script is running smoothly but it seems that it's not reading
  variables correctly fro asterisk as you can see below:

 Maybe the original author would care to step in? I seem to have lost
 interest.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Yawar Hadi
hi steve,

plz make some cahnges and now i have tested it its working fine to me

1  on first line make sure it is  3!/usr/perl/bin   not
#!/user/perl/bin
2 change reading variable from get command to argument as

 #$no1=$AGI-get_variable('callerid');
 $no1=$ARGV[0];

and where u calling scrip cahnge it  like   exten
=112,1,AGI(Dial.pl|${EXTEN});

hope it will work for u if any problem then reply me ..
i think we have time difference so thats way i quit when u replied .

On Sat, Feb 21, 2009 at 11:17 AM, Yawar Hadi yawarh...@gmail.com wrote:

 hi,
   Steve i just loged in and go through all replies.
 yes its mistakenly written as user instead of /user   on first line let be
 go through the problem of not reading the vairable and reply back to you
 soon.
 wait and dont lose your interest .this is the way to learn some thing new
 .wait let me to check it ...


 On Sat, Feb 21, 2009 at 5:09 AM, Steve Edwards 
 asterisk@sedwards.comwrote:

 On Sat, 21 Feb 2009, michel freiha wrote:

  the script is running smoothly but it seems that it's not reading
  variables correctly fro asterisk as you can see below:

 Maybe the original author would care to step in? I seem to have lost
 interest.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Darren Murphy
sorry to but in, but...

1  on first line make sure it is  3!/usr/perl/bin   not
#!/user/perl/bin

I'd suggest instead: #!/usr/bin/perl

;)

2009/2/21 Yawar Hadi yawarh...@gmail.com

 hi steve,

 plz make some cahnges and now i have tested it its working fine to me

 1  on first line make sure it is  3!/usr/perl/bin   not
 #!/user/perl/bin
 2 change reading variable from get command to argument as

  #$no1=$AGI-get_variable('callerid');
  $no1=$ARGV[0];

 and where u calling scrip cahnge it  like   exten
 =112,1,AGI(Dial.pl|${EXTEN});

 hope it will work for u if any problem then reply me ..
 i think we have time difference so thats way i quit when u replied .


 On Sat, Feb 21, 2009 at 11:17 AM, Yawar Hadi yawarh...@gmail.com wrote:

 hi,
   Steve i just loged in and go through all replies.
 yes its mistakenly written as user instead of /user   on first line let be
 go through the problem of not reading the vairable and reply back to you
 soon.
 wait and dont lose your interest .this is the way to learn some thing new
 .wait let me to check it ...


 On Sat, Feb 21, 2009 at 5:09 AM, Steve Edwards asterisk@sedwards.com
  wrote:

 On Sat, 21 Feb 2009, michel freiha wrote:

  the script is running smoothly but it seems that it's not reading
  variables correctly fro asterisk as you can see below:

 Maybe the original author would care to step in? I seem to have lost
 interest.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-20 Thread Yawar Hadi
sure shift not pressed.
it #!/usr/bin/perl

On Sat, Feb 21, 2009 at 12:43 PM, Darren Murphy dar...@victoriajd.comwrote:

 sorry to but in, but...

 1  on first line make sure it is  3!/usr/perl/bin   not
 #!/user/perl/bin

 I'd suggest instead: #!/usr/bin/perl

 ;)

 2009/2/21 Yawar Hadi yawarh...@gmail.com

 hi steve,

 plz make some cahnges and now i have tested it its working fine to me

 1  on first line make sure it is  3!/usr/perl/bin   not
 #!/user/perl/bin
 2 change reading variable from get command to argument as

  #$no1=$AGI-get_variable('callerid');
  $no1=$ARGV[0];

 and where u calling scrip cahnge it  like   exten
 =112,1,AGI(Dial.pl|${EXTEN});

 hope it will work for u if any problem then reply me ..
 i think we have time difference so thats way i quit when u replied .


 On Sat, Feb 21, 2009 at 11:17 AM, Yawar Hadi yawarh...@gmail.com wrote:

 hi,
   Steve i just loged in and go through all replies.
 yes its mistakenly written as user instead of /user   on first line let
 be go through the problem of not reading the vairable and reply back to you
 soon.
 wait and dont lose your interest .this is the way to learn some thing new
 .wait let me to check it ...


 On Sat, Feb 21, 2009 at 5:09 AM, Steve Edwards asterisk.org@
 sedwards.com wrote:

 On Sat, 21 Feb 2009, michel freiha wrote:

  the script is running smoothly but it seems that it's not reading
  variables correctly fro asterisk as you can see below:

 Maybe the original author would care to step in? I seem to have lost
 interest.

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867
 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)




 --
 Best regards

 Yawar Hadi Noshahi
  QAU Islamabad
 (+92-0300-5504798)

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] AGI script

2009-02-19 Thread michel freiha
Dear All,

I would like to ask please if someone has a AGI script that select a value
from a database and dial this value as a destination number

Regards
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-19 Thread Luis Morales
Sure,

what did you need exactly ?


On Thu, Feb 19, 2009 at 6:57 PM, michel freiha mich...@gmail.com wrote:
 Dear All,

 I would like to ask please if someone has a AGI script that select a value
 from a database and dial this value as a destination number

 Regards

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




-- 
-
Luis Morales
Consultor de Tecnologia
Cel: +(58)416-4242091
-
Empieza por hacer lo necesario, luego lo que es posible... y de
pronto estarás haciendo lo imposible

Leonardo Da'Vinci
-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-19 Thread michel freiha
Dear Sir,

I need the followingA customer will dial a specific number like 112,this
will fire a php AGI script...The AGI script will connect to the database and
see if this number (112) is registered in a specific table...If yes, AGI
script will return to asterisk a destination number registered in that table
and match the 112 then asterisk will dial out the number fetched

Please let me know if you need any other information

Regards

On Fri, Feb 20, 2009 at 1:38 AM, Luis Morales faston...@gmail.com wrote:

 Sure,

 what did you need exactly ?


 On Thu, Feb 19, 2009 at 6:57 PM, michel freiha mich...@gmail.com wrote:
  Dear All,
 
  I would like to ask please if someone has a AGI script that select a
 value
  from a database and dial this value as a destination number
 
  Regards
 
  ___
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 



 --

 -
 Luis Morales
 Consultor de Tecnologia
 Cel: +(58)416-4242091

 -
 Empieza por hacer lo necesario, luego lo que es posible... y de
 pronto estarás haciendo lo imposible

 Leonardo Da'Vinci

 -

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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

Re: [asterisk-users] AGI script

2009-02-19 Thread Steve Edwards
On Fri, 20 Feb 2009, michel freiha wrote:

 I need the followingA customer will dial a specific number like 112,this
 will fire a php AGI script...The AGI script will connect to the database and
 see if this number (112) is registered in a specific table...If yes, AGI
 script will return to asterisk a destination number registered in that table
 and match the 112 then asterisk will dial out the number fetched

 Please let me know if you need any other information

1) How much are you paying for us to do your work?

2) Shouldn't this be on -biz?

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] AGI script

2009-02-19 Thread Yawar Hadi
i have in perl AGI script if u want then let me know ...?

On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards asterisk@sedwards.comwrote:

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?

 2) Shouldn't this be on -biz?

 Thanks in advance,
 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




-- 
Best regards

Yawar Hadi Noshahi
 QAU Islamabad
(+92-0300-5504798)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script

2009-02-19 Thread David fire
2009/2/19 Steve Edwards asterisk@sedwards.com

 On Fri, 20 Feb 2009, michel freiha wrote:

  I need the followingA customer will dial a specific number like
 112,this
  will fire a php AGI script...The AGI script will connect to the database
 and
  see if this number (112) is registered in a specific table...If yes, AGI
  script will return to asterisk a destination number registered in that
 table
  and match the 112 then asterisk will dial out the number fetched
 
  Please let me know if you need any other information

 1) How much are you paying for us to do your work?
 0 probably
 2) Shouldn't this be on -biz?
 no, he dont want to pay. so it is not bussines.
 Thanks in advance,

no, thanks you.


 
 Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline Fax: +1-760-731-3000

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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




-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
()_()signature to help him gain world domination.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] AGI script fails on IAX channels (from call file).

2007-09-15 Thread Tony Mountifield
In article [EMAIL PROTECTED],
Jonas Arndt [EMAIL PROTECTED] wrote:
 
 Call File
 === Call File ==
 channel: Local/[EMAIL PROTECTED]
 maxretries: 3
 retrytime: 60
 waittime: 60
 callerid: Test *66
 application: AGI
 data: test.agi|670507
 = End Call File 

Instead of calling the application directly from the call file, make a
special extension for it, and call that extension instead:

[foo]
exten = _X.,1,Answer(0.5)
exten = _X.,2,AGI(test.agi|${EXTEN})

And then have the call file like this:

Channel: Local/[EMAIL PROTECTED]
Maxretries: 3
Retrytime: 60
Waittime: 60
CallerId: Test *66
Context: foo
Extension: 670507
Priority: 1

The Answer line may or may not be necessary, but if you find it is, that
would explain why calling the AGI directly didn't work. In that case,
perhaps you could put the Answer within the AGI.

Cheers
Tony

-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] AGI script fails on IAX channels (from call file).

2007-09-15 Thread Jonas Arndt
Tony Mountifield wrote:
 In article [EMAIL PROTECTED],
 Jonas Arndt [EMAIL PROTECTED] wrote:
   
 Call File
 === Call File ==
 channel: Local/[EMAIL PROTECTED]
 maxretries: 3
 retrytime: 60
 waittime: 60
 callerid: Test *66
 application: AGI
 data: test.agi|670507
 = End Call File 
 

 Instead of calling the application directly from the call file, make a
 special extension for it, and call that extension instead:

 [foo]
 exten = _X.,1,Answer(0.5)
 exten = _X.,2,AGI(test.agi|${EXTEN})

 And then have the call file like this:

 Channel: Local/[EMAIL PROTECTED]
 Maxretries: 3
 Retrytime: 60
 Waittime: 60
 CallerId: Test *66
 Context: foo
 Extension: 670507
 Priority: 1

 The Answer line may or may not be necessary, but if you find it is, that
 would explain why calling the AGI directly didn't work. In that case,
 perhaps you could put the Answer within the AGI.

 Cheers
 Tony

   


Hi Tony,

So the idea here is that the parameter, which I am calling the
application with, will be dynamic. I am therefore struggling a bit with
how your solution would work in the long run. It could be a good test
though. Your Extension line in the call file (670507) will match that in
the extensions.conf, right? What I have tried is

 Call File 
channel: Local/[EMAIL PROTECTED]
Context: internal
Extension: *66
Priority: 1


Then in the extensions.con

= extensions.conf =
exten = *66,1,Answer
exten = *66,2,AGI(test.agi|670507)
exten = *66,3,Hangup


This is also not an elegant solution as I have hard coded the parameter.
However, it is just for test. As you can see I am also answering the
channel here. I have exactly the same problem here. On SIP phones it
work great and on IAX (iaxy) phones it fails. I can't get the AGI script
to see the DTMF even if pushing the keys generates events in an iax2
trace. So:


== Conclusions 
IAX Phone = Dial Plan = AGI script
Works with DTFM
Call File = IAX Phone + AGI script  
   Fails, not DTMF communication
Call File = IAX Phone + Extension in dial plan = AGI Script
Fails, not DTMF communication
SIP = Work always
== Conclusions 

Unfortunately I am heading out for a week long Europe trip on Monday.
I'll try to play with this a bit more on Sunday and see if I can make
some progress.

Thanks for you help,

// Jonas

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] AGI script fails on IAX channels (from call file).

2007-09-15 Thread Tony Mountifield
In article [EMAIL PROTECTED],
Jonas Arndt [EMAIL PROTECTED] wrote:
 Tony Mountifield wrote:
  In article [EMAIL PROTECTED],
  Jonas Arndt [EMAIL PROTECTED] wrote:

  Call File
  === Call File ==
  channel: Local/[EMAIL PROTECTED]
  maxretries: 3
  retrytime: 60
  waittime: 60
  callerid: Test *66
  application: AGI
  data: test.agi|670507
  = End Call File 
  
 
  Instead of calling the application directly from the call file, make a
  special extension for it, and call that extension instead:
 
  [foo]
  exten = _X.,1,Answer(0.5)
  exten = _X.,2,AGI(test.agi|${EXTEN})
 
  And then have the call file like this:
 
  Channel: Local/[EMAIL PROTECTED]
  Maxretries: 3
  Retrytime: 60
  Waittime: 60
  CallerId: Test *66
  Context: foo
  Extension: 670507
  Priority: 1
 
  The Answer line may or may not be necessary, but if you find it is, that
  would explain why calling the AGI directly didn't work. In that case,
  perhaps you could put the Answer within the AGI.
 
 So the idea here is that the parameter, which I am calling the
 application with, will be dynamic. I am therefore struggling a bit with
 how your solution would work in the long run. It could be a good test
 though. Your Extension line in the call file (670507) will match that in
 the extensions.conf, right? What I have tried is

Yes, I figured that the 670507 part will be dynamic, which is why I used
a separate context [foo], with a wildcard extension _X., which will match
any extension of two or more digits. I then put the extension number into
the parameter list for the AGI.

So instead of generating data: test.agi|12345 in the call file you
generate extension: 12345 and that then finds its way through to the
AGI command.

  Call File 
 channel: Local/[EMAIL PROTECTED]
 Context: internal
 Extension: *66
 Priority: 1
 
 
 Then in the extensions.con
 
 = extensions.conf =
 exten = *66,1,Answer
 exten = *66,2,AGI(test.agi|670507)
 exten = *66,3,Hangup
 
 
 This is also not an elegant solution as I have hard coded the parameter.
 However, it is just for test. As you can see I am also answering the
 channel here. I have exactly the same problem here. On SIP phones it
 work great and on IAX (iaxy) phones it fails. I can't get the AGI script
 to see the DTMF even if pushing the keys generates events in an iax2
 trace.

OK, this solution is technically the same as mine, concerning channel
handling, so if you are still not getting DTMF, that is a problem.

Please try adding a delay parameter to Answer, or a separate Wait line:

exten = _X.,1,Answer(0.5)

or:

exten = _X.,1,Answer
exten = _X.,n,Wait(0.5)

It might be that something in the channel is not finished setting up
before you call your AGI. I always have a small delay after answering.

 So:
 
 == Conclusions 
 IAX Phone = Dial Plan = AGI script
 Works with DTFM
 Call File = IAX Phone + AGI script  
Fails, not DTMF communication
 Call File = IAX Phone + Extension in dial plan = AGI Script
 Fails, not DTMF communication
 SIP = Work always
 == Conclusions 
 
 Unfortunately I am heading out for a week long Europe trip on Monday.
 I'll try to play with this a bit more on Sunday and see if I can make
 some progress.

OK, hope you have some success.

Cheers
Tony
-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] AGI script fails on IAX channels (from call file).

2007-09-15 Thread Jonas Arndt
Tony Mountifield wrote:
 a separate context [foo], with a wildcard extension _X., which will match
 any extension of two or more digits. I then put the extension number into
 the parameter list for the AGI.

 So instead of generating data: test.agi|12345 in the call file you
 generate extension: 12345 and that then finds its way through to the
 AGI command.

   
Sorry, I missed that. Well, as long as what we wanted to test is tested
 OK, this solution is technically the same as mine, concerning channel
 handling, so if you are still not getting DTMF, that is a problem.

 Please try adding a delay parameter to Answer, or a separate Wait line:

 exten = _X.,1,Answer(0.5)

 or:

 exten = _X.,1,Answer
 exten = _X.,n,Wait(0.5)

 It might be that something in the channel is not finished setting up
 before you call your AGI. I always have a small delay after answering.

   
I did this. I waited as long as 2 seconds. Still the same problem
unfortunately. I can see the DTMF in the IAX trace. The AGI trace just
sits there...
 So:

 == Conclusions 
 IAX Phone = Dial Plan = AGI script
 Works with DTFM
 Call File = IAX Phone + AGI script  
Fails, not DTMF communication
 Call File = IAX Phone + Extension in dial plan = AGI Script
 Fails, not DTMF communication
 SIP = Work always
 == Conclusions 

 Unfortunately I am heading out for a week long Europe trip on Monday.
 I'll try to play with this a bit more on Sunday and see if I can make
 some progress.
 

 OK, hope you have some success.

 Cheers
 Tony
   
I have a few other things to try, but that is more like a work-around or
at least a different way to attack the problem. Richard Lyman gave me
this link http://dynx.net/ASTERISK/gnudialer/agiIVR.agi and I will look
into that as well.

Generally I have had quite some issues since upgrading to 1.4 (IVR DTMF
fails to be detected sometimes on incoming calls, with SIP = IAX
providers I get dropped incoming audio). I am attacking one problem at a
time though.

// Jonas


___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] AGI script fails on IAX channels (from call file).

2007-09-15 Thread Jonas Arndt
Guys,

The problem was that the IAX2 channel accepted both ulaw and gsm codec.
Once I dropped the gsm alternative in the iax.conf the interaction with
the AGI scripts (DTMF) worked great. So it seems that the ulaw was
picked if the IAX call was initiated by the IAX phone and hit the AGI
script through the extensions.conf. If the AGI script initiated the call
gsm was for some reason picked and  wouldn't accept DTMF.

What might be a clue here is that the iaxy based phones are configured
to just use ulaw. I tried just gsm but that didn't work. So with a phone
doing just ulaw initiating the call, that might be the reason ulaw was
picked and it worked through the dial plan.

Anyhow, a big thanks to everybody that tried to work on this with me. I
have some job still ahead (figuring out how the different DTMF modes
relates to gsm and if there might be a bug here), but I do have a
working solution.

Thanks,

// Jonas

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


  1   2   >