Board logo

標題: comnet phone outgoing not ok [打印本頁]

作者: ttmuskie    時間: 2011-11-25 21:25     標題: comnet phone outgoing not ok

Just registered and have a trial run. Incoming no problem but can't make any Outgoing call.
作者: 角色    時間: 2011-11-25 21:49

How comes,what is your SIP client? ATA? PC? iPhone? Android phone?

YH
作者: ttmuskie    時間: 2011-11-25 22:45

Android csipsimple and Linux ekiga
作者: 角色    時間: 2011-11-26 08:45

本帖最後由 角色 於 2011-11-26 09:07 編輯

Have you tried any hardware ATA?

YH
作者: ttmuskie    時間: 2011-11-26 08:49

don't have any ata
作者: ckleea    時間: 2011-11-26 09:02

回復 3# ttmuskie

It should work in sip client. Check if you have been login somewhere.
CMphone needs a bit of timeout before a fresh registration
作者: ttmuskie    時間: 2011-11-26 10:19

I want to try it under asterisk. Any brother can share the sip.conf and extension.conf? Thanks.
作者: 角色    時間: 2011-11-26 10:48

本帖最後由 角色 於 2011-11-26 15:55 編輯

回復 7# ttmuskie

send a PM to bubblestar who does have the settings.

YH
作者: ttmuskie    時間: 2011-11-26 13:11

Thanks. Just sent.
作者: bubblestar    時間: 2011-11-26 14:28

回復 9# ttmuskie


   
Replied.  Please check PM.
作者: ttmuskie    時間: 2011-11-26 17:04

I setup asterisk to play a DEMO sound for cmphone. When I called 35012565, it seems try to play to sound file but it immediate hang up. Here is the detail:

extensions.conf
  1. [from_cmphone]
  2. exten => 85235012565,n,Playback(demo-echotest)
  3. exten => 85235012565,n,Hangup()
複製代碼
sip.conf
  1. [cmphone]
  2. type=peer
  3. host=202.0.179.3
  4. port=5060
  5. fromdomain=huawei.com
  6. fromuser=85235012565
  7. realm=huawei
  8. secret=XXXX
  9. username=85235012565
  10. insecure=port,invite
  11. context=from_cmphone
  12. authname=85235012565
  13. dtmfmode=auto
  14. canreinvite=no
  15. qualify=no
複製代碼
cli
  1. == Using SIP RTP CoS mark 5
  2.     -- Executing [85235012565@from_cmphone:1] Playback("SIP/cmphone-00000000", "demo-echotest") in new stack
  3.   == Spawn extension (from_cmphone, 85235012565, 1) exited non-zero on 'SIP/cmphone-00000000'
複製代碼

作者: 角色    時間: 2011-11-26 17:23

exten => 85235012565,n,Playback(demo-echotest)

为什么是n,而不是
exten => 85235012565,1,Playback(demo-echotest)

角色
作者: ttmuskie    時間: 2011-11-26 17:26

本帖最後由 ttmuskie 於 2011-11-26 17:28 編輯

yeah.. i copied the old config . it should be:

exten => 85235012565,1,Playback(demo-echotest)

And it is still the same problem. You could try to call the 35012565 and know what I mean.
作者: 角色    時間: 2011-11-26 17:29

好像缺了register string。

角色
作者: ttmuskie    時間: 2011-11-26 17:36

Have that under general already:

[general]
pedantic=yes
register=85235012565:XXXX@202.0.179.3/85235012565
作者: 角色    時間: 2011-11-26 17:42

因为我没有CMPhone,可能要能bubblestar师兄给你打打脉。

角色
作者: bubblestar    時間: 2011-11-26 23:28

回復 11# ttmuskie


   
I use your same dialplan and give it a try.  There is no problem as you mentioned.  The message from CLI is as below:

== Using SIP RTP CoS mark 5
    -- Executing [852350XXXXX@from-cmphone:1] Playback("SIP/cmphone-00000008", "demo-echotest") in new stack
    -- <SIP/cmphone-00000008> Playing 'demo-echotest.ulaw' (language 'en')    -- Executing [852350XXXXX@from-cmphone:2] Hangup("SIP/cmphone-00000008", "") in new stack
  == Spawn extension (from-cmphone, 852350XXXXX, 2) exited non-zero on 'SIP/cmphone-00000008'


I can hear the playback before it hangs up.

The only message difference that I got is marked in RED above.  Hence, I think you may put the codec allow = ulaw in the first place of general section in sip.conf and try again.
作者: ttmuskie    時間: 2011-11-27 10:39

Thanks bublestar, tried the suggestion. But it's still the same output as I posted in the previous.
作者: bubblestar    時間: 2011-11-27 11:43

Despite of the echo test problem, can you get the normal dial in call properly?
作者: ttmuskie    時間: 2011-11-27 13:18

Under asterisk, both incoming and outgoing not working.
Under sip client (not connect to asterisk), incoming ok and outgoing not working.

I called cmphone's cs and they are now looking into my issue.
作者: ckleea    時間: 2011-11-27 22:25

Please show your sip.conf
作者: sleepsheep    時間: 2011-11-29 11:33

回復 20# ttmuskie


    what if you using software on PC? say their openeye (xp) or Xlite (win 7)? to make sure the account itself works for your network? sometimes the firewall lead to such problem, if that, you won't be able to use it normally on PC or any other facility.
作者: ttmuskie    時間: 2011-11-29 13:54

The CS from cmphone just asked me to use other program. And I tried the xlite and still no joy.
作者: ckleea    時間: 2011-11-29 15:10

I can use the old cmphone account in my siemens ip phone. Soft phone is also working.
作者: 角色    時間: 2011-11-29 22:39

Perhaps, the problem comes from the router. Try to change another router to see if any improvement can be made.

YH
作者: ckleea    時間: 2011-12-7 22:15

Has it been fixed?

No problem here
作者: ttmuskie    時間: 2011-12-8 20:44

No, still not working. May try again after when i get the mood
作者: ckleea    時間: 2011-12-8 21:55

回復 27# ttmuskie

Tell us once again which sip software/ client or ATA you used?

I have no problem in using it with iphone apps, pc zoiper, ATA, siemens ip phone and even asterisk.
Just set the three parameters provided.
作者: ttmuskie    時間: 2011-12-8 22:30

asterisk 1.8.7.1
ekiga 3.26 on linux
csipsimple on android
作者: ckleea    時間: 2011-12-9 06:22

回復 29# ttmuskie


    I have no experience with both clients you use. But if you are using the setup as you asked from bubblestar. It should work both ways. can you show your [general] of sip.conf?
作者: ttmuskie    時間: 2011-12-11 14:18

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'
作者: ckleea    時間: 2011-12-11 16:11

Why you need to use 9060 for your asterisk?

Try to set sip set debug on to cmphone context to see more output
作者: ckleea    時間: 2011-12-11 17:16

Try this in asterisk CLI

sip set debug peer cmphone
作者: bubblestar    時間: 2011-12-11 17:36

Or you might need to forward the default UDP port 5060 to 9060 in your router.
作者: ttmuskie    時間: 2011-12-11 18:16

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'
複製代碼

作者: lawleo    時間: 2012-7-14 17:01

請問你們成功了嗎?

我試了很久,都無法成功經 ComNet 打出/打入呢....
作者: lawleo    時間: 2012-7-14 17:08

本帖最後由 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
複製代碼

作者: lawleo    時間: 2012-7-14 17:13

本帖最後由 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 的話,打出打入是沒問題的
作者: lawleo    時間: 2012-7-14 17:25

  1. [local]
  2. exten => _[1-9].,1,Dial(SIP/${EXTEN}@VoIPProvider)
複製代碼
  1. [local]
  2. exten => _[1-9].,1,Dial(SIP/VoIPProvider/${EXTEN})
複製代碼
我都用過,結果一樣無法打出, 503 error
作者: lawleo    時間: 2012-7-17 10:15

有其他人用 comnet 嗎? 試了很久都無法成功打出打入呢(在 asterisk), 有其他人一起研究嗎? DMZ & NAT 都試過了, 很心灰呢.
作者: lawleo    時間: 2012-8-1 15:22

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

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

3. 撥出給其他用戶,出 503 Service Unavailable"
4. 以街外手提電話撥入,SIP phone 會 ring, 但一接聽便立即斷線
作者: 電腦超人    時間: 2012-8-2 11:19

你試試在sip.conf comment(或刪除) host=202.0.179.3
作者: 角色    時間: 2012-8-2 20:04

回復 31# ttmuskie

建议先用standard port 5060看看怎样?
作者: lawleo    時間: 2012-8-3 10:43

回復 43# 角色


    情況一樣呢.
作者: lawleo    時間: 2012-8-3 10:45

真可惡,用了 comnet 的服務數個月了,Asterisk 也用了一個月,但還沒法設定好,如 comnet 有支援服務便好了, 給錢我也願.
作者: 角色    時間: 2012-8-3 13:27

回復 45# lawleo

你Asterisk是安装在PC呢?还是安装在NAS呢?如果你用5060都有什么,那么要慢慢trobule-shoot。而CMPhone,我们其他members都有,没有听说他有什么问题。

不用担心,希望我能帮到你。(但是要晚上才行)
作者: 電腦超人    時間: 2012-8-3 13:44

我的設定是...
sip.conf

[general]
nat=yes
port=5060
bindaddr  = 0.0.0.0
externip=www.domain.com
videosupport=yes
externhost=www.domain.com
realm=www.domain.com
fromdomain=www.domain.com
localnet=192.168.6.0/255.255.255.0
qualify=yes
allowguest=no
disallow=all
allow=alaw
allow=ulaw
context=internal
t38pt_udptl = yes
pedantic = yes
srvlookup=yes

register = 852350XXXXX:XXXXXX@202.0.179.3/852350XXXXX


[comnet001]
type=peer
port=5060
fromuser=852350XXXXX
realm=huawei
secret=XXXXXX
username=852350XXXXX
insecure=port,invite
context=from-cmphone
authname=852350XXXXX
dtmfmode=auto
canreinvite=no
qualify=no

extensions.conf

[default]
exten => _9[23569]XXXXXXX,1,Dial(SIP/${FILTER(0-9,${EXTEN:1})}@comnet001,,r)

users.conf

[6001]
username = 6001
transfer = yes
mailbox = 6001
call-limit = 100
fullname = USER
registersip = no
host = dynamic
callgroup = 1
context = default
cid_number = 6001
hasvoicemail = yes
vmsecret = XXXX
email =
threewaycalling = yes
hasdirectory = yes
callwaiting = yes
hasmanager = yes
managerread = system,call,log,verbose,command,agent,user,config
managerwrite = system,call,log,verbose,command,agent,user,config
hasagent = no
hassip = yes
hasiax = yes
secret = XXXXXX
nat = yes
canreinvite = no
dtmfmode = rfc2833
insecure = port,invite
pickupgroup = 1
autoprov = no
label =
macaddress =
linenumber = 1
disallow = all
allow = ulaw,gsm,alaw,g729,h264

作者: lawleo    時間: 2012-8-5 05:09

真的不知問題在那裡.....今晚試了數小時還不能成功,只好休息了。
作者: 角色    時間: 2012-8-6 13:02

回復 48# lawleo

学习Asterisk就是这样,要花点时间才能弄明白一些事,但是这样过程挺有用,特别是你怎样document那些东西。

你的Asterisk是怎样起?用什么CPU?
作者: lawleo    時間: 2012-8-6 23:31

我用的是 arm7 cpu (raspberrypi,256MB RAM), debian squeeze / wheezy 都用過,由 source compile 出來的,外國經驗是運作正常,我這裡用 linksys pap2t / spa3000 + comnet 都沒問題,但 asterisk 就不能了。暫時只能把 asterisk 做一些簡單的 home automation, 很浪費呢.
作者: lawleo    時間: 2012-9-2 01:32

wakaka.... 終於成功了~~~~~~~
asterisk 1.8 可以成功打入打出了... wuwu....真的好累,但成功了真的很開心~

問題出在自己 compile 的版本有功能上的不足,所以一轉接便失敗,最近 asterisk 出了 official 的版本,apt-get 下來,改幾行 config 便 work 了.... 感動得想哭~

音質也很好, 沒 delay... 太好了~ 多謝早前各位的幫忙
作者: 角色    時間: 2012-9-2 08:32

恭喜你!可以开始加入我们的大家庭了。

你启动了Asterisk,那么你亲友拨打电话就简单多了。 现在你打电话范围远至哪里?

而你已经有PAP2T,SPA3000,可以下次再买ATA,可以考虑OBiTech的产品。

在网上我看过你的arm7 cpu (raspberrypi,256MB RAM),体积非常细小,估计非常省电。你是怎样购入呢?你最初购入的目的是什么?
作者: lawleo    時間: 2012-9-3 14:34

本帖最後由 lawleo 於 2012-9-3 14:39 編輯

>你启动了Asterisk,那么你亲友拨打电话就简单多了。 现在你打电话范围远至哪里?
我的用法我想和大家常用的有點不同..... 最遠的使用範圍只有約一百米...
原因是我把它作為家中的智能家居接口, 方便住在同一大廈的父母直接聯絡我們或作一些簡單查詢, 如:
- *88 (家中的電腦會叫我和妻子到樓下吃飯)
- *87 (用 google latitude 查詢我的位置, 在電話讀出, 以便知道找何時回家照顧女兒)
- *85 (留言後在我的電腦讀出)
- 拿起電話筒5秒後會直撥到我家的 IP Phone(s)
- 晚上十一時後電話不會接入, 免得吵醒寶寶, 除非連撥兩次(這個還未設定好)
基本上他們常用的有約十個小功能, 我都印了一張清單放在電話旁, 方便老人家用,
而我無需每天多次拿起電話, 只為回應重復的問題, 方便了大家
當然, 有了 SPA3000, 經他們家的直線撥出香港電話也可, 出國旅行時致電回家可省一些,
但一年也用不到三次呢, 現在有了 asterisk, 設定更方便.

> 而你已经有PAP2T,SPA3000,可以下次再买ATA,可以考虑OBiTech的产品。
謝謝你的建議, 會考慮, 但可能要等我移民後或女兒去外國讀書時才用得了, 真的很遙遠的事呢.

> 在网上我看过你的arm7 cpu (raspberrypi,256MB RAM),体积非常细小,估计非常省电。你是怎样购入呢?你最初购入的目的是什么?
本來購入是為了作電單車的小電腦, 以令它智能一點, 只是因為相機模件還沒推出, 暫時用作 asterisk 也不錯, 而用電量真的很少(只需~2W), 家中的太陽能供電(~20-30W)也能支撐, 算是有點意外.....本來的智能電單車麻, 暫時用 arduino 亦已達到不錯的功能, 暫時又不動他好了.
作者: lawleo    時間: 2012-9-3 14:36

購入方法很簡單, 在 RS / element14 網上訂便可以了, 2百多港元一台, 暫時有點供不應求, 大約要三周才能入手... 我還好, 第一次推網上預購時已訂了, 所以現在已玩了兩個多月, 真的好玩~
作者: 角色    時間: 2012-9-3 20:13

谢谢lawleo兄的信息。看你你也Linux的高手,不然怎样能把raspberrypi搞定。

如果系统家里好了,你慢慢开始,然后你就会把整个系统做大。

真猜不到你打电话距离那么近,我们有的可能远至几万里。
作者: 角色    時間: 2012-10-1 02:57

看来我的问题和他一样,但是它换了Asterisk版本就可以,难度我现在的版本有问题?
作者: 角色    時間: 2012-10-1 12:24

回復 51# lawleo

CHing你set了什么,可以在Asterisk打出打入呢?是的Asterisk是否在NAT后面,还是有独立IP呢?
作者: lawleo    時間: 2012-10-1 14:07

我沒有設定太多東西,只設定 rtpstart & rtpend 為 10000, 20000, port 5060, NAT, ddwrt 後...
同時 reg 了兩個電話號碼都沒問題... codec 只用 ulaw, 其他的連 voicemail 也沒有開.
作者: lawleo    時間: 2012-10-1 14:33

Raspberry PI 上的 asterisk 為 Asterisk 1.8.13.1~dfsg-1 (之前的都有問題)
Synology DSM 4.1 上的 asterisk 為 1.8.13.1-0005




歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2