2012-10-21 109 views
0

我在freeswitch中有以下代碼。我們決定使用星號代替。將freeswitch轉換爲星號

我已經安裝好了,如果您撥打8XXXX,您將撥打另一臺服務器。

sip1:/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml 
    <node type="allow" cidr="192.168.0.2/32"/> 
sip1:/usr/local/freeswitch/conf/dialplan/default.xml 
redirect numbers 8XXXX to sip2 
    <extension name="Dial to sip2"> 
    <condition field="destination_number" expression="^8(\d\d\d\d)$"> 
     <action application="bridge" data="sofia/internal/[email protected]"/> 
    </condition> 
    </extension> 
sip1:/usr/local/freeswitch/conf/dialplan/public.xml 
route foreign calls to the the extension 
    <extension name="Calls from sip2"> 
    <condition field="destination_number" expression="^(\d\d\d\d)$"> 
    <action application="transfer" data="$1 XML default"/> 
    </condition> 
    </extension> 


sip2:/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml 
    <node type="allow" cidr="192.168.0.1/32"/> 
sip2:/usr/local/freeswitch/conf/dialplan/default.xml 
redirect numbers 8XXXX to sip1 
    <extension name="Dial to sip1"> 
    <condition field="destination_number" expression="^8(\d\d\d\d)$"> 
     <action application="bridge" data="sofia/internal/[email protected]"/> 
    </condition> 
    </extension> 
sip2:/usr/local/freeswitch/conf/dialplan/public.xml 
route foriegn calls to the extension 
    <extension name="Calls from sip1"> 
    <condition field="destination_number" expression="^(\d\d\d\d)$"> 
    <action application="transfer" data="$1 XML default"/> 
    </condition> 
    </extension> 

在自由切換代碼中,我看到文件acl.conf.xml已配置?星號中的相應文件是什麼?以及如何在該文件中實現相同的配置?

我已經在下面創建了extensions.conf文件。這個文件就夠了嗎?我是否錯過了將這些綁定在一起的一些粘合邏輯?我是SIP配置的新手。

[incoming] 
exten => 123,1,Answer() 
same => n(menuprompt),Background(main-menu) 

exten => 1,1,Playback(digits/1) 
same => n,Goto(incoming,menuprompt,123) 

exten => 2,1,Playback(digits/2) 
same => n,Goto(incoming,menuprompt,123) 

exten => 9,1,Hangup() 

[main-menu] 
exten => n(menuprompt),Background(main-menu) 

exten => 3,1,Playback(digits/3) 
same => n,Goto(main-menu,menuprompt,n) 

exten => 4,1,Playback(digits/4) 
same => n,Goto(main-menu,menuprompt,n) 

exten => 9,1,Hangup() 
+1

對於Asterisk,相應的文件是'/ etc/asterisk/extensions.conf',你可能想簽出[Asterisk book](http:// astbook.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-DP-Basics.html)如何重寫撥號方案 – number5

+0

我已經創建了一個撥號方案,我已經在上面進行了更新。是否需要更多爲了這?我是否缺少某種膠水邏輯。我是這個系統的新手。謝謝。 – liv2hak

+1

您至少需要在sip.conf中設置sip憑據並將默認上下文設置爲傳入或主菜單,請嘗試閱讀本書前五部分,特別是[本部分](http://astbook.asteriskdocs .ORG/EN/3rd_Edition /星號簿-HTML-塊/ DeviceConfig_id216341.html) – number5

回答

1

請問您爲什麼離開FreeSWITCH?恕我直言,它比Asterisk更容易和更好地處理,並且性能很好