返回列表 發帖
回復 45# lawleo


The setting in sip.conf is

[cmphone]
type=peer
host=202.0.179.3
port=5060
fromdomain=huawei.com
fromuser=8523xxxxxxx
realm=huawei
secret=you password
username=8523xxxxxxx
insecure=port,invite
context=from-cmphone
authname=8523xxxxxxxx
dtmfmode=auto
canreinvite=no
qualify=no

Please look up further in this forum for direction

TOP

回復 46# ckleea


    thx....

以上的 setting 我也借過來用過,可惜結果一樣,看來是其他問題了。

剛好 raspberry pi 出了新的 raspbian 版本,正在安裝,希望再 compile 後會有點不同的結果。

TOP

回復 46# ckleea


    請問
fromdomain=huawei.com
realm=huawei

是否必要?

如我是用 HKBN 的 BB100, 也用以上的嗎?
我capture過 PAP2T 的 packet, 發覺他也是用 huawei.com & huawei

只奇怪為甚麼要用 huawei 呢?

TOP

extension.conf

請問撥出電話, 你是用那一句呢? a or b?
[local]
;a) exten => _[1-9].,1,Dial(SIP/VoIPProvider/${EXTEN})
;b) exten => _[1-9].,1,Dial(SIP/${EXTEN}@VoIPProvider)

兩句我都試過, 也是 503 error

[from-cmphone]
exten => 85235021085,1,Dial(SIP/10&SIP/20,30)

TOP

wu wu... 試左好耐都唔成功, 有無人可以救下我呀...

TOP

回復  ckleea


    請問
fromdomain=huawei.com
realm=huawei

是否必要?

如我是用 HKBN 的 BB100, 也用 ...
lawleo 發表於 2012-7-19 11:39


CMPhone 的register domain不是華為吧

it is my cmphone config
[COMNET_PSTN]
context = DID_COMNET_PSTN
host = 202.0.179.3
username = 8523XXXXXXX
fromuser = 8523XXXXXXX
realm = 8523XXXXXXX
trunkname = COMNET_PSTN
secret = ??????????????
hasiax = no
registeriax = no
hassip = yes
registersip = yes
hasexten = no
insecure = port,invite
disallow = all
allow = ulaw
qualify = no
transport = udp
canreinvite = no
type = friend
dtmfmode = rfc2833
hasvoicemail = no

   
context  指返去自己既incoming call dial plan
使用sip show registry檢查返是否成功登入cmphone.

TOP

試左都還是不能.
raspberrypi*CLI> sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time                 
202.0.179.3:5060                        N      85235021085        105 Registered           Sat, 21 Jul 2012 01:21:16

這部份應該登入成功,但當我一打出時....
  == Using SIP RTP CoS mark 5
    -- Executing [18503@users:1] Dial("SIP/30-00000011", "SIP/18503@cmphone") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/18503@cmphone
    -- Got SIP response 503 "Service Unavailable" back from 202.0.179.3:5060
    -- SIP/cmphone-00000012 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/30-00000011' status is 'CONGESTION'

立即 503 error, rejected

打入時都係差唔多
  == Using SIP RTP CoS mark 5
    -- Called SIP/40
    -- SIP/40-00000003 is ringing
    -- SIP/40-00000003 answered SIP/cmphone-00000000
    -- Locally bridging SIP/cmphone-00000000 and SIP/40-00000003
  == Spawn extension (from_cmphone, 85235021085, 1) exited non-zero on 'SIP/cmphone-00000000'
[Jul 21 01:31:24] WARNING[4395]: chan_sip.c:3639 retrans_pkt: Retransmission timeout reached on transmission 05c852db110d192113947b295dfca5c4@192.168.2.233:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response

TOP

我的登入句法是
register=8523502xxxx:xxxxxxxx@202.0.179.3/8523502xxxx    <- 放在 sip.conf 裡的 general

dialplan for 打出打入 in extension.conf
[local]
exten => _[1-9].,1,Dial(SIP/cmphone/${EXTEN})   <- 唔work
;exten => _[1-9].,1,Dial(SIP/${EXTEN}@cmphone)   <- 都唔 work

[users]
include => local

[from_cmphone]
exten => 8523502xxxx,1,Dial(SIP/10&SIP/20&SIP/30&SIP/40,30)

TOP

以上的句法有沒有問題呢?
岩岩把 asterisk 都放在 DMZ 裡,情況一樣呢.

TOP

我開個 ssh 出來,有人可以幫我看看嗎?

TOP

本帖最後由 Qnewbie 於 2012-7-21 02:25 編輯

Outbound:
you might try
exten => _Z.,1,Dial(SIP/852XXXXXXXX/{EXTEN},,60)
there 852XXXXXXXX is your username in cmphone.

Inbound:
[from_cmphone]
exten => s,1,Dial(SIP/10&SIP/20&SIP/30&SIP/40,30)

Change the type=peer to
type = friend
in sip.conf

TOP

還是不能....鞋...相同的 error message

撥出
= Using SIP RTP CoS mark 5
    -- Executing [18503@users:1] Dial("SIP/40-00000001", "SIP/85235021085/18503,,60") in new stack
[Jul 21 09:14:27] WARNING[4838]: chan_sip.c:5440 create_addr: Purely numeric hostname (85235021085), and not a peer--rejecting!
[Jul 21 09:14:27] WARNING[4838]: app_dial.c:2341 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'SIP/40-00000001' status is 'CHANUNAVAIL'
  == Using SIP RTP CoS mark 5
    -- Executing [85235021085@from_cmphone:1] Dial("SIP/cmphone-00000002", "SIP/10&SIP/20&SIP/30&SIP/40,30") in new stack
    -- SIP/40-00000004 answered SIP/cmphone-00000002
    -- Locally bridging SIP/cmphone-00000002 and SIP/40-00000004
  == Spawn extension (from_cmphone, 85235021085, 1) exited non-zero on 'SIP/cmphone-00000002'

TOP

本帖最後由 bubblestar 於 2012-7-21 13:11 編輯

回復 57# lawleo


Try this:


sip.conf

[general]
…..
pedantic  = yes
…..

register = 852350xxxxx:password@202.0.179.3/852350xxxxx

[cmphone]
type=peer
host=202.0.179.3
port=5060
fromdomain=huawei.com
fromuser=852350xxxxx
realm=huawei
secret=your_password
username=852350xxxxx
insecure=port,invite
context=from-cmphone
authname=852350xxxxx
dtmfmode=auto
canreinvite=no
qualify=no


extensions.conf

[viaCMPhone]
exten => _888X.,1,Dial(SIP/cmphone/${EXTEN:3})
exten => _888X.,n,Hangup()

[from-cmphone]
exten => 852350xxxxx(你的 CMphone號碼),1,Dial(SIP/6001,30,Ttr)
exten => 852350xxxxx(你的CMphone號碼),n,Hangup()

TOP

I do not have any problem in using my sip.conf.

TOP

>_< 都係唔得,

另加 external ip & localnet 都唔 work....攪乜呀....

TOP

返回列表