場景:
8007發啓了一個會議,會議室已經創建好,允許8007通過通過DYNAMIC_FEATURES中的按鍵來將被叫方加入到會議室,被叫不允許使用DYNAMIC_FEATURES中定義的按鍵功能。
我寫的撥號腳本如下:
[dynamic-nway-start] exten => _X.,1,NoOp(dynamic-nway-start) exten => _X.,n,Set(CONFNO=9999) exten => _X.,n,Set(MEETME_EXIT_CONTEXT=dynamic-nway-invite) exten => _X.,n,MeetMe(${CONFNO},pdMX) [dynamic-nway-invite] exten => *,1,NoOp(dynamic-nway-invite) exten => *,n,Read(DEST,dial,,i) exten => *,n,Set(DYNAMIC_FEATURES=threeway-inv#threeway-noinv) exten => *,n,Dial(Local/${DEST}@dynamic-nway-invite-dest,,g) exten => *,n,Set(MEETME_EXIT_CONTEXT=dynamic-nway-invite) exten => *,n,Set(DYNAMIC_FEATURES=) exten => *,n,MeetMe(9999,pdMX1) [dynamic-nway-invite-dest] exten => _X.,1,NoOp(dynamic-nway-invite-dest) exten => _X.,n,Set(DYNAMIC_FEATURES=) exten => _X.,n,Dial(SIP/${EXTEN},,M(nway-join,9999,1)) [macro-nway-join] exten => s,1,NoOp(dynamic-nway-join) exten => s,n,Set(DYNAMIC_FEATURES=) ;exten => s,n,ChannelRedirect(${BRIDGEPEER},dynamic-threeway,9999)
我想在撥號腳本中通過 Set(DYNAMIC_FEATURES=)來取消被叫使用DYNAMIC_FEATURES中定義的按鍵功能。嘗試了下,發現行不通,設置沒有任何效果,被叫依然可以使用DYNAMIC_FEATURES中設置的按鍵。
解決方法:
仔細研究了下DYNAMIC_FEATURES,其格式定義說明如下:
; The syntax for declaring a dynamic feature is any of the following: ; ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]] ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,"<AppArguments>"[,MOH_Class]] ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>([<AppArguments>])[,MOH_Class] ; FeatureName -> This is the name of the feature used when setting the ; DYNAMIC_FEATURES variable to enable usage of this feature. ; DTMF_sequence -> This is the key sequence used to activate this feature. ; ActivateOn -> This is the channel of the call that the application will be executed ; on. Valid values are "self" and "peer". "self" means run the ; application on the same channel that activated the feature. "peer" ; means run the application on the opposite channel from the one that ; has activated the feature. ; ActivatedBy -> This is which channel is allowed to activate this feature. Valid ; values are "caller", "callee", and "both". "both" is the default. ; The "caller" is the channel that executed the Dial application, while ; the "callee" is the channel called by the Dial application. ; Application -> This is the application to execute. ; AppArguments -> These are the arguments to be passed into the application. If you need ; commas in your arguments, you should use either the second or third ; syntax, above. ; MOH_Class -> This is the music on hold class to play while the idle ; channel waits for the feature to complete. If left blank, ; no music will be played.
在格式定義說明中,我看到了ActivatedBy這個寫法可以解決我這個問題,嘗試了一把,問題解決了,applicationmap定義如下:
threeway-start => *0,callee/caller,Macro,threeway-start threeway-inv => **,caller/caller,Macro,threeway-ok threeway-noinv => *#,callee/caller,Macro,threeway-notok
多方通話中,禁止被叫方使用DYNAMIC_FEATURES中定義的功能(features)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.