Re: [asterisk-users] Variable setting in AMI Originate
Anthony Messina wrote: Working with asterisk 1.4; using the AMI Originate command, it is possible to do something like: Variable: CDR(accountcode)123456 Or must the variable names be var[n] where n is a number? I'd like to set the accountcode for a Local channel that originates a call. Thanks. -A Anthony, I may not understand your question, but setting variables from the AMI is easy enough: Action: Originate Channel: local/[EMAIL PROTECTED] Context: to_meetme Exten: s Priority: 1 Variable: CALLERID(num)=${DEV_NAME}|CALLERID(name)=Conference Waiting Async: true -- Warm Regards, Lee Everything I needed to learn in life, I learned selling encyclopedias door to door. ___ -- 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] Variable setting in AMI Originate
Anthony Messina wrote: On Friday 15 February 2008 10:21:33 am Lee Jenkins wrote: Anthony Messina wrote: Working with asterisk 1.4; using the AMI Originate command, it is possible to do something like: Variable: CDR(accountcode)123456 Or must the variable names be var[n] where n is a number? I'd like to set the accountcode for a Local channel that originates a call. Thanks. -A Anthony, I may not understand your question, but setting variables from the AMI is easy enough: Action: Originate Channel: local/[EMAIL PROTECTED] Context: to_meetme Exten: s Priority: 1 Variable: CALLERID(num)=${DEV_NAME}|CALLERID(name)=Conference Waiting Async: true That was exactly my question (even though I forgot the =sign). However, I am not able to get that to work for reason. I'm trying to set the CDR(accountcode) on the first leg of the call and am using Channel: Local/... I am able to get it to work if I use Variable: var1=12345 then, use CDR(accountcode)=${var1} in the dialplan, but I was hoping to avoid this hack. Not sure what could be the reason, maybe something in the cdr stuff and call origination maybe? -- Warm Regards, Lee Everything I needed to learn in life, I learned selling encyclopedias door to door. ___ -- 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] Variable setting in AMI Originate
Anthony Messina wrote: On Friday 15 February 2008 10:21:33 am Lee Jenkins wrote: *snipped Priority: 1 Variable: CALLERID(num)=${DEV_NAME}|CALLERID(name)=Conference Waiting Async: true That was exactly my question (even though I forgot the =sign). However, I am not able to get that to work for reason. I'm trying to set the CDR(accountcode) on the first leg of the call and am using Channel: Local/... I am able to get it to work if I use Variable: var1=12345 then, use CDR(accountcode)=${var1} in the dialplan, but I was hoping to avoid this hack. why not just add Account: 12345 to the originate? (side note: you can also have multiple Variable: lines (some versions of asterisk have issue with the | from what i hear) so the above would look like ... Variable: CALLERID(num)=${DEV_NAME} Variable: CALLERID(name)=Conference Waiting those are bad examples as you should just use CallerID: Callerid: Conference Waiting DEVNUMBER i hope this helps. ___ -- 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] Variable setting in AMI Originate
On Friday 15 February 2008 10:21:33 am Lee Jenkins wrote: Anthony Messina wrote: Working with asterisk 1.4; using the AMI Originate command, it is possible to do something like: Variable: CDR(accountcode)123456 Or must the variable names be var[n] where n is a number? I'd like to set the accountcode for a Local channel that originates a call. Thanks. -A Anthony, I may not understand your question, but setting variables from the AMI is easy enough: Action: Originate Channel: local/[EMAIL PROTECTED] Context: to_meetme Exten: s Priority: 1 Variable: CALLERID(num)=${DEV_NAME}|CALLERID(name)=Conference Waiting Async: true That was exactly my question (even though I forgot the =sign). However, I am not able to get that to work for reason. I'm trying to set the CDR(accountcode) on the first leg of the call and am using Channel: Local/... I am able to get it to work if I use Variable: var1=12345 then, use CDR(accountcode)=${var1} in the dialplan, but I was hoping to avoid this hack. -- Anthony - http://messinet.com - http://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E signature.asc Description: This is a digitally signed message part. ___ -- 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] Variable setting in AMI Originate
On Friday 15 February 2008 01:49:46 pm Richard Lyman wrote: Anthony Messina wrote: On Friday 15 February 2008 10:21:33 am Lee Jenkins wrote: *snipped Priority: 1 Variable: CALLERID(num)=${DEV_NAME}|CALLERID(name)=Conference Waiting Async: true That was exactly my question (even though I forgot the =sign). However, I am not able to get that to work for reason. I'm trying to set the CDR(accountcode) on the first leg of the call and am using Channel: Local/... I am able to get it to work if I use Variable: var1=12345 then, use CDR(accountcode)=${var1} in the dialplan, but I was hoping to avoid this hack. why not just add Account: 12345 to the originate? (side note: you can also have multiple Variable: lines (some versions of asterisk have issue with the | from what i hear) so the above would look like ... Variable: CALLERID(num)=${DEV_NAME} Variable: CALLERID(name)=Conference Waiting those are bad examples as you should just use CallerID: Callerid: Conference Waiting DEVNUMBER i hope this helps. that does work like a charm--it sets the accountcode, except that, for some reason, i can't access the CDR(accountcode) value during call time. i CAN see it in channel variables, etc. but ${CDR(accountcode)} evaluates to nothing--it's blank. it even show up in the CDR after the call is over. my dialplan basically says, set the callerid to the accountcode (which is my real pstn number). since i have some users for which i need to block outbound callerid on the pstn line, this was a convenient way to distinguish between my devices with my accountcode and those without. now that i'm trying to originate calls from a secured webpage using the manager, it seems like my method isn't working well :( i'd like to keep the callerid=Name internal exten settings in my devices so internally, we see the extensions instead of a full pstn number. how else would i be able to set the outbound/external callerid per device? -- Anthony - http://messinet.com - http://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E signature.asc Description: This is a digitally signed message part. ___ -- 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] Variable setting in AMI Originate
On Fri, 2008-02-15 at 14:45 -0600, Anthony Messina wrote: that does work like a charm--it sets the accountcode, except that, for some reason, i can't access the CDR(accountcode) value during call time. i CAN see it in channel variables, etc. but ${CDR(accountcode)} evaluates to nothing--it's blank. it even show up in the CDR after the call is over. This definitely sounds like a bug to me -- would you mind creating a bug report on the bug tracker (http://bugs.digium.com) so that the developers can take a look at it? Thanks! -- Jared Smith Community Relations Manager Digium, Inc. ___ -- 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] Variable setting in AMI Originate
Working with asterisk 1.4; using the AMI Originate command, it is possible to do something like: Variable: CDR(accountcode)123456 Or must the variable names be var[n] where n is a number? I'd like to set the accountcode for a Local channel that originates a call. Thanks. -A -- Anthony - http://messinet.com - http://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E signature.asc Description: This is a digitally signed message part. ___ -- 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