返回列表 發帖

ComNet Phone + Asterisk Settings

本帖最後由 角色 於 2013-1-12 23:57 編輯

由于要安装ComNet Phone在Asterisk Server上,所以回看之前写的帖子,但是都整理不清楚,所以特意重新再整理一次,而ComNet Phone + Asterisk-GUI就应该比较清楚。

假如ComNet Phone给的login资料

telephone number:85233445566
password:123456
IP:202.0.179.3

注意的地方:

1. No Authentication (注册问题),在sip.conf的[options]下pandentic=yes。
2. 打入问题,就是要asterisk.conf下的[options]下internal_timing=yes。
3. 打出问题,就是在sip.conf,注册时,qualify=no,如果我们用qualify=yes就打不通。


sip.conf
  1. [general]
  2. pandantic=yes

  3. register => 85233445566:123456@202.0.179.3/85233445566

  4. [cmphone]
  5. type=friend
  6. host=202.0.179.3
  7. username = 85233445566
  8. fromuser=85233445566
  9. realm=85233445566
  10. realm=huawei
  11. secret = 123456
  12. insecure = port,invite
  13. dtmfmode = auto
  14. canreinvite = no
  15. transport=udp
  16. nat=yes
  17. qualify = no
  18. disallow = all
  19. allow = ulaw
  20. allow = alaw
  21. context = from-cmphone
複製代碼
asterisk.conf
  1. [options]
  2. internal_timing = yes
複製代碼
externsions.conf
  1. [internal-cmphone]
  2. exten => _X.,1,Dial(SIP/${EXTEN}@cmphone,,r)

  3. [from-cmphone]
  4. exten => 85233445566,1,Dial(SIP/6001)
複製代碼

以下是CLI中看到的結果,服務器好像根本就沒有對註冊請求進行回复:

---
Really destroying SIP dialog '29e65a5b1d3ba6e255a6b42c342bd36b@[::1]' Method: REGISTER
Retransmitting #1 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #2 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #3 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #4 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #5 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #6 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #7 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK676deb9d;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 119 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Really destroying SIP dialog '29e65a5b1d3ba6e255a6b42c342bd36b@[::1]' Method: REGISTER
Retransmitting #1 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #2 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #3 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #4 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #5 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0


---
Retransmitting #6 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK3400e611;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as5360791d
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 29e65a5b1d3ba6e255a6b42c342bd36b@[::1]
CSeq: 120 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="ffc15424342a4ea0fc10777e529ff83d", response="0412ab3fa87bafb73401d7f6a72f8514"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0

TOP

那么你可能要进入console (CLI)mode看看。

TOP

我都看不出有什么不同

TOP

本帖最後由 bigtoodog 於 2014-9-18 15:03 編輯

我是在Raspberry上用FreePBX 2.11.0.37。

這是我的Comnet trunk設置,另外已經在asterisk.conf中增加了internal_timing=yes, 在sip.conf中增加了pedantic=yes:

Outgoing settings(Incoming 沒有設置):

type=friend
host=202.0.179.3
username=852xxxxxxxx
fromuser=852xxxxxxxx
realm=852xxxxxxxx&huawei
secret=xxxxxx
insecure=port,invite
dtmfmode=auto
canreinvite=no
transport=udp
nat=yes
qualify=no
disallow=all
allow=ulaw&alaw

TOP

如果是这样,估计问题是Asterisk settings与你的FreePBX+Asterisk有出入,那么你只能用editor,看看我说的configuration file里面的settings是否一致。

TOP

回復 7# 角色


在外面可以註冊我的asterisk,並且可以使用Google Vocie(打入打出),也可以利用Callda和51dyt trunk進行打電話。

TOP

我想起,你的Asterisk,在外面是否能注册你的account,然后外面都可以互打呢?(因为这个动作可以检测你的router,Asterisk settings是否正确!)

TOP

本帖最後由 bigtoodog 於 2014-9-18 13:22 編輯

回復 5# 角色


是的,我就是按照你給的Asterisk的settings來設置的,但State始終是Request Sent,既無法打出也無法接到電話。不知是什麼原因(已經加入pedantic=yes)。

用手機軟件(譬如median5-fone)是可以註冊,並且可以打入打出。但在Asterisk上總是不行。

SIP debug log如下:

Retransmitting #4 (NAT) to 202.0.179.3:5060:
REGISTER sip:202.0.179.3 SIP/2.0
Via: SIP/2.0/UDP 223.255.173.232:5600;branch=z9hG4bK6d2498c0;rport
Max-Forwards: 70
From: <sip:852xxxxxxxx@202.0.179.3>;tag=as32eb2edc
To: <sip:852xxxxxxxx@202.0.179.3>
Call-ID: 608f10fd0a91b8d161f336c134737100@[::1]
CSeq: 103 REGISTER
User-Agent: FPBX-2.11.0(11.11.0)
Authorization: Digest username="852xxxxxxxx", realm="huawei", algorithm=MD5, uri="sip:sip:huawei.com", nonce="eeb7893d4f373e2b9ccaf57eec494dd6", response="babb888fea7a0dbdf266e0a2c6599939"
Expires: 120
Contact: <sip:852xxxxxxxx@223.255.173.232:5600>
Content-Length: 0

TOP

你是否按照在用Asterisk的settings呢?因为我没有用过FreePBX,所以不知道怎样处理。

TOP

本帖最後由 bigtoodog 於 2014-9-17 15:52 編輯

回復 3# 角色


我在自己的FreePBX上設置了ComNet trunk後,state始終是Request Sent。不知是什麼原因?

而Callda Trunk就是註冊成功。

TOP

如果有问题,跟帖讨论。

TOP

我的asterisk也是不能打入打出,今晚回去試試你的方法

TOP

返回列表