[英]How to make an application interact with Asterisk server to make a call?
要使Asterisk打電話給您,您要做的就是將一個文本文件放在Asterisk服務器的傳出假脫機目錄中。 星號會盡快撥打電話。
將文件放在以下位置:
/var/spool/asterisk/outgoing/
Channel:SIP/Phonenukmber@YourSipProvider
Context: context in your dialplan to place this call when it is answered
Exten: extension in that context to place call on
Priority: priority to start on, normally 1
Callerid: number to use when placing the call
您還可以在此處傳遞其他幾個值以獲取更多信息: http : //www.voip-info.org/wiki/view/Asterisk+auto-dial+out
到目前為止,這是最簡單的方法,不需要與Asterisk進行任何編程交互。
如果您需要從android手機撥打電話,請搜索SIP庫或sip softphone for android。
如果您需要從android調用控制星號,則可以檢查AMI(管理器接口)或在星號服務器上編寫服務器端API並在應用程序中使用它。
您安裝服務器,然后編寫一個與SIP通信的客戶端應用程序。 使用這些開源項目中的任何一個都可以快速入門。
只需安裝Asterisk並創建一些SIP對等方。 要撥打PSTN電話,您需要擁有VOIP中繼線或模擬中繼線或ISDN中繼線。
完成上述操作后,請從Android應用程序市場為您的Android手機下載3cx軟件電話,並注冊在Asterisk中創建的任何SIP擴展名。
要撥打電話,您需要根據需要編寫撥號計划。 對於新手,您可以參閱《無淚的Trixbox》一書,該書可在Google免費獲得。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.