返回列表 發帖
Note: I'm using port 9060 rather than the default 5060

[general]
bindport=9060
pedantic=yes
register=85235012565:my_pwd@202.0.179.3/85235012565

sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time                 
202.0.179.3:5060                        N      85235012565        105 Registered           Sun, 11 Dec 2011 14:05:29
1 SIP registrations.

call to 28805522
cli>
== Using SIP RTP CoS mark 5
    -- Executing [28805522@default:1] Dial("SIP/nexus-00000006", "SIP/cmphone/28805522") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/cmphone/28805522
    -- Got SIP response 503 "Service Unavailable" back from 202.0.179.3:5060
    -- SIP/cmphone-00000007 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [28805522@default:2] Hangup("SIP/nexus-00000006", "") in new stack
  == Spawn extension (default, 28805522, 2) exited non-zero on 'SIP/nexus-00000006'

TOP

Why you need to use 9060 for your asterisk?

Try to set sip set debug on to cmphone context to see more output

TOP

Try this in asterisk CLI

sip set debug peer cmphone

TOP

Or you might need to forward the default UDP port 5060 to 9060 in your router.

TOP

1. enabled the DMZ to my machine.
2. changed the bindport=5060
3. restarted asterisk
4. call from my mobile to asterisk and here the result with debug enabled:
  1. <--- Transmitting (NAT) to 202.0.179.3:5060 --->
  2. SIP/2.0 200 OK
  3. Via: SIP/2.0/UDP 202.0.179.3:5060;branch=z9hG4bK9b25a61f7;received=202.0.179.3;rport=5060
  4. From: <sip:my_mobile@202.0.179.3;user=phone>;tag=615e35ff
  5. To: <sip:85235012565@119.236.110.45;user=phone>;tag=as0035d85b
  6. Call-ID: 3f4457e5135ab023d1b27dba2066ae65@sx3000
  7. CSeq: 2 BYE
  8. Server: Asterisk PBX 1.8.7.1
  9. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
  10. Supported: replaces, timer
  11. Content-Length: 0


  12. <------------>
  13.   == Spawn extension (from_cmphone, 85235012565, 1) exited non-zero on 'SIP/cmphone-00000001'
複製代碼

TOP

請問你們成功了嗎?

我試了很久,都無法成功經 ComNet 打出/打入呢....

TOP

本帖最後由 lawleo 於 2012-7-14 17:10 編輯

extension.conf
  1. [macro-phone]
  2. exten => s,1,Dial(SIP/${MACRO_EXTEN},25)
  3. exten => s,n,Goto(${DIALSTATUS},1)
  4. exten => ANSWER,1,Hangup
  5. exten => CANCEL,1,Hangup
  6. exten => NOANSWER,1,Voicemail(${MACRO_EXTEN}@default,u)
  7. exten => BUSY,1,Voicemail(${MACRO_EXTEN}@default,b)
  8. exten => CONGESTION,1,Voicemail(${MACRO_EXTEN}@default,b)
  9. exten => CHANUNAVAIL,1,Voicemail(${MACRO_EXTEN}@default,u)
  10. exten => a,1,VoicemailMain(${MACRO_EXTEN}@default)

  11. [stations]
  12. exten => 10,1,Macro(phone)
  13. exten => 20,1,Macro(phone)
  14. exten => 4242,1,VoicemailMain(default)

  15. [long-distance]
  16. ; long-distance (I do not know how to dial long distance yet)

  17. [local]
  18. exten => _[1-9].,1,Dial(SIP/${EXTEN}@VoIPProvider)

  19. [users]
  20. include => stations
  21. include => local
  22. include => long-distance

  23. [from_cmphone]
  24. exten => 8523502XXXX,1,Dial(SIP/10,30)
複製代碼
sip.conf
  1. [general]
  2. port=5070
  3. bindaddr=0.0.0.0
  4. pedantic=yes
  5. register=8523502XXXX:XXXX@202.0.179.3/8523502XXXX

  6. [10]
  7. type=peer
  8. host=dynamic
  9. secret=10
  10. context=users
  11. mailbox=10@default

  12. [20]
  13. type=peer
  14. host=dynamic
  15. secret=20
  16. context=users
  17. mailbox=20@default

  18. [VoIPProvider]
  19. type=peer
  20. host=202.0.179.3
  21. port=5060
  22. username=8523502XXXX
  23. fromuser=8523502XXXX
  24. secret=XXXX
  25. insecure=port,invite
  26. context=from_cmphone
  27. dtmfmode=auto
  28. canreinvite=no
  29. qualify=no
複製代碼

TOP

本帖最後由 lawleo 於 2012-7-14 17:23 編輯

用街外電話打入的話,SoftPhone 會 ring, 但一接聽很便收線
  1. == Using SIP RTP CoS mark 5
  2.     -- Executing [8523502XXXX@from_cmphone:1] Dial("SIP/VoIPProvider-00000002", "SIP/10,30") in new stack
  3.   == Using SIP RTP CoS mark 5
  4.     -- Called SIP/10
  5.     -- SIP/10-00000003 is ringing
  6.     -- SIP/10-00000003 answered SIP/VoIPProvider-00000002
  7.     -- Locally bridging SIP/VoIPProvider-00000002 and SIP/10-00000003
  8.   == Spawn extension (from_cmphone, 8523502XXXX, 1) exited non-zero on 'SIP/VoIPProvider-00000002'
複製代碼
用 SoftPhone 打出, 完全不通
  1. == Using SIP RTP CoS mark 5
  2.     -- Executing [9499XXXX@users:1] Dial("SIP/10-00000006", "SIP/VoIPProvider/9499XXXX") in new stack
  3.   == Using SIP RTP CoS mark 5
  4.     -- Called SIP/VoIPProvider/9499XXXX
  5.     -- Got SIP response 503 "Service Unavailable" back from 202.0.179.3:5060
  6.     -- SIP/VoIPProvider-00000007 is circuit-busy
  7.   == Everyone is busy/congested at this time (1:0/1/0)
  8.     -- Auto fallthrough, channel 'SIP/10-00000006' status is 'CONGESTION'
複製代碼
Port 5060, 53, 69 & 10000-20000 已 forward
如只用 Linksys PAP2T 直接連上 ComNet 的話,打出打入是沒問題的

TOP

  1. [local]
  2. exten => _[1-9].,1,Dial(SIP/${EXTEN}@VoIPProvider)
複製代碼
  1. [local]
  2. exten => _[1-9].,1,Dial(SIP/VoIPProvider/${EXTEN})
複製代碼
我都用過,結果一樣無法打出, 503 error

TOP

有其他人用 comnet 嗎? 試了很久都無法成功打出打入呢(在 asterisk), 有其他人一起研究嗎? DMZ & NAT 都試過了, 很心灰呢.

TOP

有以下的情況,不知大家會否想到時甚麼問題呢?

1. 撥出給另一cmphone用戶(我的家人,用 SPA3000),電話會ring, 但對方一接聽便斷線
2. cmphone用戶(家人)致電我的 SIP phone, 可以成功接聽,完全沒問題

3. 撥出給其他用戶,出 503 Service Unavailable"
4. 以街外手提電話撥入,SIP phone 會 ring, 但一接聽便立即斷線

TOP

你試試在sip.conf comment(或刪除) host=202.0.179.3

TOP

回復 31# ttmuskie

建议先用standard port 5060看看怎样?

TOP

回復 43# 角色


    情況一樣呢.

TOP

真可惡,用了 comnet 的服務數個月了,Asterisk 也用了一個月,但還沒法設定好,如 comnet 有支援服務便好了, 給錢我也願.

TOP

返回列表