本帖最後由 bubblestar 於 2011-1-5 23:03 編輯
以下 Dial Plan,在使用Google Voice 來電接入至 Asterisk 1.8 時,可以清楚地在電話機及CLI console上正確打出來電顯示號碼。現跟大家分享一下:
[from-GV]
第一種設定,有來電顯示及無需按電話鍵盤確認,便可以立刻接聽。
exten => _[@Xa-z].,1,Noop(Incoming Google Voice call for ${EXTEN})
exten => _[@Xa-z].,n,Set(CALLERID(number)=${CALLERID(name):2:10})
exten => _[@Xa-z].,n,Set(CALLERID(name)=${CALLERID(number)})
exten => _[@Xa-z].,n,Answer()
exten => _[@Xa-z].,n,Wait(2)
exten => _[@Xa-z].,n,SendDTMF(1)
exten => _[@Xa-z].,n,Dial(SIP/6001,20)
exten => h,1,Hangup()
第二種設定,可於來電後,先按 1 接聽,或按 2 字飛線往Gmail's Voicemail,有來電顯示
exten => _[@Xa-z].,1,Noop(Incoming Google Voice call for ${EXTEN})
exten => _[@Xa-z].,n,Set(CALLERID(number)=${CALLERID(name):2:10})
exten => _[@Xa-z].,n,Set(CALLERID(name)=${CALLERID(number)})
exten => _[@Xa-z].,n,Dial(SIP/6001,20,D(:1))
exten => h,1,Hangup()
第三種,將所有來電號碼,都先detect 其號碼再顯示於CLI 之上。
exten => s,1,Noop(Incoming Google Voice call for ${EXTEN})
exten => s,n,Set(CALLERID(number)=${CALLERID(name):2:10})
exten => s,n,Set(CALLERID(name)=${CALLERID(number)})
exten => s,n,Answer()
exten => s,n,Wait(2)
exten => s,n,SendDTMF(1)
exten => s,n,Dial(SIP/6001,20)
exten => h,1,Hangup()
註: 同一時間,只可以使用一套Dial Plan,不要同時使用多於一個DP,否則會造成混亂。 |