1. 添加SIP網關
在目錄conf/sip_profile/external/中創建一個XML文件,名字可以隨便,比如:ims_gw1.xml,在文件中輸入下面的代碼
<gateway name="gw1">
<param name="realm" value="14.29.16.241:5082"/>
<param name="username" value="075582493381" />
<param name="password" value="1234" />
<param name="register" value="false"/>
</gateway>
2. 加載配置
sofia profile external rescan
3. 查看狀態
4. 外呼測試
指定主叫號碼,進行外呼,並且聽回音。
originate {origination_caller_id_number=075582493381}sofia/gateway/gw1/0180xxxx3622 &echo
在測試時,遇到兩個問題。
其一:
INCOMPATIBLE_DESTINATION: 不兼容,把freeswitch的h264和vp8編碼去掉,就可以了。
其二:-err unallocated_number
最后發現時,我這邊對接的端口給錯了,默認了5080。