[Asterisk-video] 答复: Variable Pass Through h324m_gw()
Klaus Darilion
klaus.mailinglists at pernau.at
Thu Aug 26 02:58:29 CDT 2010
Am 26.08.2010 09:01, schrieb Liu Jianquan:
> [test1]
> exten => 120,1,Set(GLOBAL(Digit)="123")
That would work, but can causes problems if you have concurrent calls as
you are using a global variable.
I think you can also workaround by using variable inheritance, e.g:
; use _ for one-time inheritance
Set(_Digit=123)
; use __ for infinite inheritance
Set(__Digit=123)
In both cases you query the value as before without underscore, e.g.:
NoOp(${Digit})
regards
klaus
>
> -----原始邮件-----
> *发件人:* asterisk-video-bounces at lists.digium.com
> [mailto:asterisk-video-bounces at lists.digium.com]*代表 *lemonash
> *发送时间:* 2010年8月26日 14:44
> *收件人:* asterisk-video at lists.digium.com
> *主题:* [Asterisk-video] Variable Pass Through h324m_gw()
>
> Hi folks!
>
> The following is my dialplan:
> [test1]
> exten => 120,1,Set(Digit="123")
> exten => 120,n,NoOp(${Digit})
> exten => 120,n,h324m_gw(ds at test2)
>
> [test2]
> exten => ds,1,h324m_gw_answer()
> exten => ds,n,NoOp(${Digit})
> exten => ds,n,Set(Name=${Digit})
>
>
> The variable Name in test2 is NULL!
> How can I get the variable from test1?
>
> Thanks!
>
More information about the asterisk-video
mailing list