# SIP-Server-FreePBX ## Forward - 目的: 建立一個可以執行 Conference Call by server base 的環境 ## Reference - 使用 FreePBX SIP Server - 使用此 docker image 比較容易架設環境 - https://hub.docker.com/r/tiredofit/freepbx ## Steps 1. docker pull tiredofit/freepbx:latest 2. docker run -d tiredofit/freepbx - 問題: 無法取得 host 的 WAN IP ![image](https://hackmd.io/_uploads/HymzYCgfC.png) 結果: 改為: docker run -d --net host tiredofit/freepbx 3. 進入 container bash 交互模式 - docker exec -it container-id bash 結果: ![image](https://hackmd.io/_uploads/HyTPFAez0.png) ## troubleshooting 1. 註冊時,server response 401 結果: 需要做 reload config Note: 需要先設定好帳號才能註冊,不能任意account註冊,account在Applications -> extensions這裡設定 2. RTP 封包,可以看到會送到一個特殊的 IP address ![image](https://hackmd.io/_uploads/B1AM9AlM0.png) 結果: 可以把 NTA 先關掉 : ![image](https://hackmd.io/_uploads/HygSqRlGA.png) 3. 設定 Conference Call 結果: ![image](https://hackmd.io/_uploads/ryuY9RlfA.png) 4. 展示目前設定的情況 - ![image](https://hackmd.io/_uploads/rJ23cCefA.png) 5. Hold call 送 Re-Invite 可以發現 IP 變掉了 ... - ![image](https://hackmd.io/_uploads/HkgdjrGz0.png) - Server response 的180 Ring 或是 200ok的 Contact 欄位 - 都是帶 Contact: <sip:111.240.96.35:5060> ###### `VoIP`