Perhaps, but it only gave me what the channel was using. There were other variables that might have been available that the grep method found.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jim Dickenson Sent: Friday, October 30, 2009 11:33 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Voicemail file Easier than poking around the source code is to add a DumpChan() step to any area of your dialplan to see all defined variables. -- Jim Dickenson mailto:[email protected] CfMC http://www.cfmc.com/ On Oct 30, 2009, at 8:51 AM, Danny Nicholas wrote: > This thread taught me my "Asterisk Lesson of the day" - to find the > Variables passed to the dialplan from a program, go to the source > directory > and do 'grep setvar_helper app'. Here's the output for > app_voicemail.c in > 1.4.26.2 > grep setvar_helper app_voicemail.c > pbx_builtin_setvar_helper(ast, "VM_NAME", vmu->fullname); > pbx_builtin_setvar_helper(ast, "VM_DUR", dur); > pbx_builtin_setvar_helper(ast, "VM_MSGNUM", passdata); > pbx_builtin_setvar_helper(ast, "VM_CONTEXT", context); > pbx_builtin_setvar_helper(ast, "VM_MAILBOX", mailbox); > pbx_builtin_setvar_helper(ast, "VM_CALLERID", > (!ast_strlen_zero(cidname) || !ast_strlen_zero(cidnum)) ? > pbx_builtin_setvar_helper(ast, "VM_CIDNAME", > (!ast_strlen_zero(cidname) ? cidname : "an unknown caller")); > pbx_builtin_setvar_helper(ast, "VM_CIDNUM", > (!ast_strlen_zero(cidnum) ? cidnum : "an unknown caller")); > pbx_builtin_setvar_helper(ast, "VM_DATE", date); > pbx_builtin_setvar_helper(ast, "VM_CATEGORY", category ? > ast_strdupa(category) : "no category"); > pbx_builtin_setvar_helper(ast, "ORIG_VM_CALLERID", > origcallerid); > pbx_builtin_setvar_helper(ast, "ORIG_VM_CIDNAME", > origcidname); > pbx_builtin_setvar_helper(ast, "ORIG_VM_CIDNUM", > origcidnum); > pbx_builtin_setvar_helper(ast, "ORIG_VM_DATE", > origdate); > pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "FAILED"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "USEREXIT"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "USEREXIT"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED"); > pbx_builtin_setvar_helper(chan, "VM_MESSAGEFILE", > "IMAP_STORAGE"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "FAILED"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "FAILED"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "FAILED"); > pbx_builtin_setvar_helper(chan, > "VM_MESSAGEFILE", fn); > pbx_builtin_setvar_helper(chan, > "VM_MESSAGEFILE", "IMAP_STORAGE"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "FAILED"); > pbx_builtin_setvar_helper(chan, "VMSTATUS", > "SUCCESS"); > pbx_builtin_setvar_helper(chan, "DIFF_DAY", temp); > pbx_builtin_setvar_helper(chan, "DIFF_DAY", NULL); > pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED"); > pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", > "SUCCESS"); > pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", > "FAILED"); > pbx_builtin_setvar_helper(chan, "AUTH_MAILBOX", > mailbox); > pbx_builtin_setvar_helper(chan, "AUTH_CONTEXT", > vmus.context); > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Ishfaq > Malik > Sent: Friday, October 30, 2009 10:38 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Voicemail file > > You could use the AMI to find out how many messages are in the > voicemail > mailbox and then work out the file name from that... > > Anahi Ludueña wrote: >> Yes, but is there a way to know the filename of that message? >> For example: msg0029.wav? >> I know where it is saved, but if I want to return it, I need to find >> the last one... and it is not recommended in my opinion... >> Thanks, >> >> * >> ------------------------------------------------------------------------ >> * >> >> *Anahi Ludueña* >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> From: [email protected] >> To: [email protected] >> Date: Fri, 30 Oct 2009 10:14:27 -0500 >> Subject: Re: [asterisk-users] Voicemail file >> >> Assuming you arent writing your VMs to a database, the voicemail >> will be in >> /var/spool/asterisk/voicemail/default/<extension>/INBOX/msg<####>.WAV >> (wav, gsm, txt depends on voicemail.conf). >> >> >> >> ------------------------------------------------------------------------ >> >> *From:* [email protected] >> [mailto:[email protected]] *On Behalf Of *Anahi >> Ludueña >> *Sent:* Friday, October 30, 2009 10:06 AM >> *To:* [email protected] >> *Subject:* [asterisk-users] Voicemail file >> >> >> >> Hi all, >> When somebody leaves a message in the voicemailbox, is there a way to >> know the file name of it? >> I need to return the voicemail file name in the deadagi command. >> Thanks, >> >> Anahi >> >> ------------------------------------------------------------------------ >> >> Entra al Nuevo Canal Motor y descubre por qué los coches más rápidos >> sólo aparcan en MSN. Nuevo diseño, más completo y abierto a tu >> opinión. ¡Nuevo Canal Motor! <http://motor.es.msn.com/> >> >> >> ------------------------------------------------------------------------ >> Todo el espacio y cuidado que merecen tus fotos digitales lo tienes >> en >> Windows Live Fotos. ¡Pruébalo! <http://www.vivelive.com/compartirfotos/ >> > >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> -- 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 > > -- > Ishfaq Malik > Software Developer > PackNet Ltd > > Office: 0161 660 3062 > > _______________________________________________ > -- 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 _______________________________________________ -- 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
