Re: [asterisk-users] Question on screening calls / Question about the Dial g option
On Tue, Oct 7, 2008 at 4:36 PM, Mike <[EMAIL PROTECTED]> wrote: > Hi, > > > > I have a simple desire to be able to screen people before being onnected to > them. I`ve seen plenty of examples on the web and I`ve figured it out. > There is only one case in where it doesn't act as I want it to: if I hang up > the phone, I don`t want the caller to be disconnected but (for the sake of > making this example simpler) I want him to hear "the person you are trying > to reach is unavailable". > > > > Problem is, in my screen macro (the one called using the M() option in the > dial command), I can set MACRO_RESULT but it`s all lost when I hang up. If I > use the g() option in dial, the MACRO_RESULT variable is lost. Actually, > as far as I can tell (which is also what I understand about channel > variables) as soon as the I hang up the dial, more commands will be executed > but all variables will be lost. > > > > So, I guess my question is: how do I set a variable that ISN`T lost when > the call initiated using the Dial g option is hung up ? > > > > Regards,** > > * * > > *Mike* > What variables do you need to play "the person you are trying to reach is unavailable"? Just use the 'h' extension to play the file. BTW, channel variables ARE available to the h extension to a degree, at least to the first priority of the h exten, they seem to get lost after the first priority even if you use setvar or set with single or double underscores. -- Thanks, Steve Totaro +18887771888 (Toll Free) +12409381212 (Cell) +12024369784 (Skype) ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 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] Question on screening calls / Question about the Dial g option
Mike wrote: > Doug, > > Thanks for the quick answer. How does that help me though, since this is a > per channel variable and not a global variable? > Make sure your key in the database is specific to only that call. Time, date, caller-id number or even a combination of all. Can't you save your channel variable within the db and purge it when you're done with it? Save your MACRO_RESULTS as the value and the key being your channel? Since I don't know what your macro is actually doing, I'm just throwing things out there. If you need a persistant variable, save it to your database with enough info to identify what you're looking for. Once done, purge the database of that entry. Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 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] Question on screening calls / Question about the Dial g option
Doug, Thanks for the quick answer. How does that help me though, since this is a per channel variable and not a global variable? Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Lytle Sent: Tuesday, October 07, 2008 16:54 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Question on screening calls / Question about the Dial g option Mike wrote: > > > > So, I guess my question is: how do I set a variable that ISN`T lost > when the call initiated using the Dial g option is hung up ? > You can use the internal database for that: http://www.voip-info.org/wiki/index.php?page=Asterisk+func+db Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 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 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 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] Question on screening calls / Question about the Dial g option
Mike wrote: > > > > So, I guess my question is: how do I set a variable that ISN`T lost > when the call initiated using the Dial g option is hung up ? > You can use the internal database for that: http://www.voip-info.org/wiki/index.php?page=Asterisk+func+db Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 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
[asterisk-users] Question on screening calls / Question about the Dial g option
Hi, I have a simple desire to be able to screen people before being onnected to them. I`ve seen plenty of examples on the web and I`ve figured it out. There is only one case in where it doesnt act as I want it to: if I hang up the phone, I don`t want the caller to be disconnected but (for the sake of making this example simpler) I want him to hear "the person you are trying to reach is unavailable". Problem is, in my screen macro (the one called using the M() option in the dial command), I can set MACRO_RESULT but it`s all lost when I hang up. If I use the g() option in dial, the MACRO_RESULT variable is lost. Actually, as far as I can tell (which is also what I understand about channel variables) as soon as the I hang up the dial, more commands will be executed but all variables will be lost. So, I guess my question is: how do I set a variable that ISN`T lost when the call initiated using the Dial g option is hung up ? Regards, Mike ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 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