Hello, I am having some trouble with the Asterisk::AGI perl library. It seems that the AGI->Exec() command is causing me a problem. Here's the line in my AGI code: $AGI->exec('Record',"$vmfile:wav, 30"); I'm trying to record voicemail to the file name stored in $vmfile with a silence timeout of 30. However, this is not being parse by AGI or Asterisk correctly, since I get the following output from debug level 5: -- AGI Script Executing Application: (Record) Options:(/tmp/asterisk/incident-3893006535:wav,) -- Playing 'beep' (language 'en') Jun 22 13:53:06 WARNING[1209214400]: file.c:856 ast_writefile: No such format 'wav,' Jun 22 13:53:06 WARNING[1209214400]: app_record.c:221 record_exec: Could not create file /tmp/asterisk/incident-3893006535 Jun 22 13:53:08 WARNING[1209214400]: file.c:464 ast_openstream: File /tmp/asterisk/incident-3893006535 does not exist in any format Jun 22 13:53:08 WARNING[1209214400]: app_agi.c:336 handle_streamfile: Unable to open /tmp/asterisk/incident-3893006535 == Spawn extension (default, s, 3) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' Any ideas on how to make AGI parse this arguement correctly? Thanks, Tom Daly
$AGI->exec('Record',"$vmfile:wav 30"); ----- Original Message ----- From: "Tom Daly" <tomdaly@gmail.com> To: <asterisk-users@lists.digium.com> Sent: Monday, June 28, 2004 8:05 PM Subject: [Asterisk-Users] AGI->Exec Problem> Hello, > I am having some trouble with the Asterisk::AGI perl library. It seems > that the AGI->Exec() command is causing me a problem. > > Here's the line in my AGI code: $AGI->exec('Record',"$vmfile:wav, 30"); > > I'm trying to record voicemail to the file name stored in $vmfile with > a silence timeout of 30. However, this is not being parse by AGI or > Asterisk correctly, since I get the following output from debug level > 5: > > -- AGI Script Executing Application: (Record) > Options:(/tmp/asterisk/incident-3893006535:wav,) > -- Playing 'beep' (language 'en') > Jun 22 13:53:06 WARNING[1209214400]: file.c:856 ast_writefile: No such > format 'wav,' > Jun 22 13:53:06 WARNING[1209214400]: app_record.c:221 record_exec: > Could not create file /tmp/asterisk/incident-3893006535 > Jun 22 13:53:08 WARNING[1209214400]: file.c:464 ast_openstream: File > /tmp/asterisk/incident-3893006535 does not exist in any format > Jun 22 13:53:08 WARNING[1209214400]: app_agi.c:336 handle_streamfile: > Unable to open /tmp/asterisk/incident-3893006535 > == Spawn extension (default, s, 3) exited non-zero on 'Zap/1-1' > -- Hungup 'Zap/1-1' > > Any ideas on how to make AGI parse this arguement correctly? > > Thanks, > Tom Daly > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
On Mon, 28 Jun 2004, Tom Daly wrote:> Hello, > I am having some trouble with the Asterisk::AGI perl library. It seems > that the AGI->Exec() command is causing me a problem. > > Here's the line in my AGI code: $AGI->exec('Record',"$vmfile:wav, 30");The proper usage would be: $AGI->exec('Record', "$vmfile:wav|30"); I guess it isn't clearly documented in my code/examples so I'll try to add some in before the next release. When it was implemented the | was the only seperator in asterisk, it wasn't until many months later that the (,,,) args were implemented James http://asterisk.gnuinter.net