返回列表 發帖

FreePBX + ET263 求救 (已fixed)

本帖最後由 asdfmmx 於 2011-6-17 15:48 編輯

各位我係 Asterisk 新手

我想用SIP  phone --> FreePBX --> Firewall --> Intenet --> ET263 --> China (其實是第一步,不過都不成功)
每次打都是busy tone. 沒有一次成功
直接 SIP phone --> Firewall --> Intenet --> ET263 --> China 是可以的

我用 Trixbox2.8.04 and Elestix 2.03都一樣 ,我知都係basic on FreePBX

有沒有人可以分享一下 ET263 的 setting, 有什麼要特別注意
Trunk Setting
Outbound Caller ID: 568xxxxx
Dial Rules:
0.
5.
Outgoing settings
PEER Details
host=211.150.115.14:10002
username=568xxxxxx
secret=xxxxxx
type=friend  (or peer 都係唔得)
qualify=yes
nat=yes
disallow=all
allow=ulaw&alaw
dtmfmode=rfc2833
canreinvite=yes
fromdomain=sip.etelephone.cn
insecure=invite

Register String:
568xxxxxx:xxxxxx@sip.etelephone.cn:10002/568xxxxxx

每次打都是busy tone. 沒有一次成功

我發現
IP Trunks Online           0
IP Trunks Registrations 1

在 Asterisk SIP Settings 已是 NAT yes
在Firewall 己放 5060, 10000-20000 放不放都不成功



Elastix203*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
3440/3440                  10.68.38.100     D   N   A  46492    OK (8 ms)
568105087/568105087        (Unspecified)        N      5060     UNKNOWN
2 sip peers [Monitored: 1 online, 1 offline Unmonitored: 0 online, 0 offline]

在SSH Asterisk CLI enable 左
Elastix203*CLI>sip set debug ip sip.etelephone.cn:10002
Looking for 5681xxxx8 in from-sip-external (domain 210.6.xx.xx)

<--- Transmitting (NAT) to 211.150.115.14:10002 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 211.150.115.14:10002;branch=z9hG4bK-c8359f-e1177b8-47118c27;received=211.150.115.14
From: <sip:eps003@net263.com>;tag=4df75dfd27904
To: <sip:568xxxxx4@net263.com>;tag=as07a49d0b
Call-ID: 4df75dfd27904@211.150.115.14
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:210.6.xxx.xx>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '4df75dfd27904@211.150.115.14' in 32000 ms (Method: OPTIONS)

<--- SIP read from UDP:211.150.115.14:10002 --->
OPTIONS sip:568xxxxx4@210.6.205.89:1024 SIP/2.0
From: <sip:eps003@net263.com>;tag=4df75dfd27905
To: <sip:568xxxxx9@net263.com>
Call-ID: 4df75dfd27905@211.150.115.14
CSeq: 1 OPTIONS
Via: SIP/2.0/UDP 211.150.115.14:10002;branch=z9hG4bK-c8359f-e1177b8-2520addc
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for 568xxxxx9 in from-sip-external (domain 210.6.205.89)

<--- Transmitting (NAT) to 211.150.115.14:10002 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 211.150.115.14:10002;branch=z9hG4bK-c8359f-e1177b8-2520addc;received=211.150.115.14
From: <sip:eps003@net263.com>;tag=4df75dfd27905
To: <sip:568xxxxx4@net263.com>;tag=as5b3ff35e
Call-ID: 4df75dfd27905@211.150.115.14
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.6.2.13
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:210.6.xxx.xxx>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '4df75dfd27905@211.150.115.14' in 32000 ms (Method: OPTIONS)



在沒有師兄師姊可以幫忙看一下有什麼問題,我試下幾天都不成功, 謝謝

以下是concole log (當SIP phone 打ET263 時)
   -- Remote UNIX connection
    -- Remote UNIX connection disconnected
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [8568xxxxx4@from-internal:1] Macro("SIP/3440-00000008", "user-callerid,SKIPTTL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/3440-00000008", "AMPUSER=3440") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/3440-00000008", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/3440-00000008", "1?Set(REALCALLERIDNUM=3440)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/3440-00000008", "AMPUSER=3440") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/3440-00000008", "AMPUSERCIDNAME=Jason") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/3440-00000008", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/3440-00000008", "AMPUSERCID=3440") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/3440-00000008", "CALLERID(all)="Jason" <3440>") in new stack
    -- Executing [s@macro-user-callerid:9] ExecIf("SIP/3440-00000008", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:10] GotoIf("SIP/3440-00000008", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] NoOp("SIP/3440-00000008", "Using CallerID "Jason" <3440>") in new stack
    -- Executing [8568xxxxx4@from-internal:2] ExecIf("SIP/3440-00000008", "1?Set(TRUNKCIDOVERRIDE=568xxxxx7)") in new stack
    -- Executing [8568xxxxx4@from-internal:3] Set("SIP/3440-00000008", "_NODEST=") in new stack
    -- Executing [8568xxxxx4@from-internal:4] Macro("SIP/3440-00000008", "record-enable,3440,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/3440-00000008", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("SIP/3440-00000008", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("SIP/3440-00000008", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,15)
    -- Executing [s@macro-record-enable:15] GotoIf("SIP/3440-00000008", "0?IN") in new stack
    -- Executing [s@macro-record-enable:16] ExecIf("SIP/3440-00000008", "1?MacroExit()") in new stack
    -- Executing [8568xxxxx4@from-internal:5] Macro("SIP/3440-00000008", "dialout-trunk,2,568xxxxx4,,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/3440-00000008", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/3440-00000008", "0?sub-pincheck,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/3440-00000008", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/3440-00000008", "DIAL_NUMBER=568xxxxx4") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/3440-00000008", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/3440-00000008", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/3440-00000008", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/3440-00000008", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/3440-00000008", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/3440-00000008", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/3440-00000008", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/3440-00000008", "0?Set(REALCALLERIDNUM=3440)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/3440-00000008", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/3440-00000008", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/3440-00000008", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/3440-00000008", "TRUNKOUTCID=568xxxxx7") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/3440-00000008", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/3440-00000008", "1?Set(CALLERID(all)=568xxxxx7)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/3440-00000008", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/3440-00000008", "1?Set(CALLERID(all)=568xxxxx7)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/3440-00000008", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/3440-00000008", "1?AGI(fixlocalprefix)") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
  == fixlocalprefix: Dialpattern 5. matched. 568xxxxx4 -> 568xxxxx4
    -- <SIP/3440-00000008>AGI Script fixlocalprefix completed, returning 0
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/3440-00000008", "OUTNUM=568xxxxx4") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/3440-00000008", "custom=SIP/568xxxxx7") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/3440-00000008", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/3440-00000008", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/3440-00000008", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/3440-00000008", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/3440-00000008", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:19] Dial("SIP/3440-00000008", "SIP/568xxxxx7/568xxxxx4,300,") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:20] NoOp("SIP/3440-00000008", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20") in new stack
    -- Executing [s@macro-dialout-trunk:21] Goto("SIP/3440-00000008", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/3440-00000008", "RC=20") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/3440-00000008", "20,1") in new stack
    -- Goto (macro-dialout-trunk,20,1)
    -- Executing [20@macro-dialout-trunk:1] Goto("SIP/3440-00000008", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/3440-00000008", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/3440-00000008", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 20 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:4] Set("SIP/3440-00000008", "CALLERID(number)=3440") in new stack
    -- Executing [8568xxxxx4@from-internal:6] Macro("SIP/3440-00000008", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/3440-00000008", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/3440-00000008", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("SIP/3440-00000008", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("SIP/3440-00000008", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <SIP/3440-00000008> Playing 'all-circuits-busy-now.gsm' (language 'en')
    -- <SIP/3440-00000008> Playing 'pls-try-call-later.gsm' (language 'en')
    -- Executing [s@macro-outisbusy:5] Congestion("SIP/3440-00000008", "20") in new stack
  == Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'SIP/3440-00000008' in macro 'outisbusy'
  == Spawn extension (from-internal, 8568xxxxx4, 6) exited non-zero on 'SIP/3440-00000008'
    -- Executing [h@from-internal:1] Macro("SIP/3440-00000008", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/3440-00000008", "1?noautomon") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] NoOp("SIP/3440-00000008", "TOUCH_MONITOR_OUTPUT=") in new stack
    -- Executing [s@macro-hangupcall:4] GotoIf("SIP/3440-00000008", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] GotoIf("SIP/3440-00000008", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,10)
    -- Executing [s@macro-hangupcall:10] GotoIf("SIP/3440-00000008", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,12)
    -- Executing [s@macro-hangupcall:12] Hangup("SIP/3440-00000008", "") in new stack
  == Spawn extension (macro-hangupcall, s, 12) exited non-zero on 'SIP/3440-00000008' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/3440-00000008'

TOP

你的SIP settings好像跟standard的ET263不同。

你可以参考我的Asterisk server settings:

sip.conf

;ET 263 accounts
register => 5880xxxxx:password@sip.etelephone.cn:10002/5880xxxxx

[et263]
type=friend
username=5880xxxxx
secret=password
host=sip.etelephone.cn
fromuser=5880xxxxx
fromdomain=net263.com
port=10002
dtmfmode=auto
canreinvite=no
insecure=port,invite
context=from-et263


extensions.conf

;101 ET263
[trunk-et263]
exten => _101.,1,Dial(SIP/${EXTEN:3}@et263,,)
exten => _101.,n,Hangup()


[from-et263]
exten => 56810xxxxx,1,Dial(SIP/2001,,)

TOP

謝謝角色兄, 幾句己解決我的問題,想一下意見
我現在 Elastrix 同 Trixbox 即是 FreePBX,
我還買了一張 TDP400P, 我想寫一aplication 如IVR, Callback
用FreePBX 的原因是因為方便, 不用想Install 的問題, 好怕在Linux上install program
沒幾次會成功 和加SIP 電話和很多功能都不用寫code 己有tftp server 等等

但我又發覺他們太复杂了,像我跟你的回復改setting時, set 唔到 Inbound Route (打唔入)
最後只能手動把
[from-et263]
exten => 56810xxxxx,1,Dial(SIP/2001,,)
放在 extensions_custom.conf 才行
想問問你們學習, Asterisk 會由這開始, 還是由零開始一句一句寫起,謝謝

TOP

你的问题我早期学习Asterisk一样出现过。

因为不知道FreePBX里面做什么,坊间很多examples都是以Asterisk Programming Language (APL)来表达,而且FreePBX都是在Asterisk (APL)之上谢的东西,很多时候用他们现成的东西会有很多东西出来,但是要自己改了就复杂很多。

所以我们这里很多人学习Asterisk,都是从APL开始的。

角色

TOP

你的意思是 只Install Asterisk 由 APL 寫起? 但對我來說Install Asterisk 都有點難
我在一只 CISCO 7912, 我想在 Trixbox intall Chan_SCCP 都不成功
yum 完一個error 後 fix,  跟往係十個error,
如果 7912 support SIP,  要有一個SIP fireware 同 tftp
而Trixbox default己有, 如要处理太多Linux 問題, 走到很遠
非常謝謝你

TOP

你的SIP settings好像跟standard的ET263不同。

你可以参考我的Asterisk server settings:

sip.conf

;ET  ...
角色 發表於 2011-6-17 12:47



    多謝角色兄的指引,我已搞掂Elastix接ET263了, 下一步就是接SPA3000, 轉PSTN.

浮雲

TOP

返回列表