返回列表 發帖

Asterisk freepbx打電話問題

照呢個set
http://www.haijd.net/article/index.php?action=read&id=806
打真實電話(香港電話)出現問題
Asterisk FreePBX 2.8.0.3
# dahdi_hardware
pci:0000:01:03.0     wctdm+       e159:0001 Wildcard TDM400P REV E/F

dahdi show channels
Chan Extension  Context         Language   MOH Interpret        Blocked    State     
pseudo            default                    default                         In Service
      2            from-analog                default                         In Service
      3            from-zaptel                default                         In Service
Channel: 3
File Descriptor: 11
Span: 1
Extension:
Dialing: no
Context: from-zaptel
Caller ID:
Calling TON: 0
Caller ID name:
Mailbox: none
Destroy: 0
InAlarm: 1
Signalling Type: FXS Kewlstart
Radio: 0
Owner:
Real:
Callwait:
Threeway:
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: no
Busy Detection: no
TDD: no
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
DND: no
Echo Cancellation:

[Oct 2 20:32:03] VERBOSE[3363] netsock.c: == Using SIP RTP TOS bits 184
[Oct 2 20:32:03] VERBOSE[3363] netsock.c: == Using SIP RTP CoS mark 5
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:1] Macro("SIP/104-00000004", "user-callerid,SKIPTTL,") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:1] Set("SIP/104-00000004", "AMPUSER=104") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:2] GotoIf("SIP/104-00000004", "0?report") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:3] ExecIf("SIP/104-00000004", "1?Set(REALCALLERIDNUM=104)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:4] Set("SIP/104-00000004", "AMPUSER=104") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:5] Set("SIP/104-00000004", "AMPUSERCIDNAME=paul") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:6] GotoIf("SIP/104-00000004", "0?report") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:7] Set("SIP/104-00000004", "AMPUSERCID=104") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:8] Set("SIP/104-00000004", "CALLERID(all)="paul" <104>") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:9] ExecIf("SIP/104-00000004", "0?Set(CHANNEL(language)=)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:10] GotoIf("SIP/104-00000004", "1?continue") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-user-callerid,s,19)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-user-callerid:19] NoOp("SIP/104-00000004", "Using CallerID "paul" <104>") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:2] NoOp("SIP/104-00000004", "Calling Out Route: 9_outside") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:3] Set("SIP/104-00000004", "MOHCLASS=default") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:4] Set("SIP/104-00000004", "_NODEST=") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:5] Macro("SIP/104-00000004", "record-enable,104,OUT,") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-record-enable:1] GotoIf("SIP/104-00000004", "1?check") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-record-enable,s,4)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-record-enable:4] ExecIf("SIP/104-00000004", "0?MacroExit()") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-record-enable:5] GotoIf("SIP/104-00000004", "0?Group:OUT") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-record-enable,s,15)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-record-enable:15] GotoIf("SIP/104-00000004", "0?IN") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-record-enable:16] ExecIf("SIP/104-00000004", "1?MacroExit()") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:6] Macro("SIP/104-00000004", "dialout-trunk,1,63035127,") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:1] Set("SIP/104-00000004", "DIAL_TRUNK=1") in new stack

你是怎样解决呢?

角色

TOP

[s@macro-dialout-trunk:19] Dial("SIP/104-00000004", "DAHDI/g0/85263035127,300,") in new stack
[Oct 2 ...
candenn 發表於 2010-10-3 23:25



    有勞
解決了

TOP

Digium有Dahdi driver for FreePBX的,你update一些freepbx driver看看。特别是从Digium的AsteriskNOW里Asterisk 1.6 + freepbx就有,我也简单用过。

角色

TOP

[s@macro-dialout-trunk:19] Dial("SIP/104-00000004", "DAHDI/g0/85263035127,300,") in new stack
[Oct 2 20:32:03] WARNING[3756] app_dial.c: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)

這通常表示 Asterisk 無 load 到 DAHDI driver

TOP

1, 可否 dump 個 dahdi_scan 的輸出結果看?
2, 入到 asterisk -vvvvvvvvvvvvvvvr後,試一試打 CLI command :
dahdi show channels
看看有什麼東西看。

TOP

就是只安装Asterisk 1.6 然后自己写programming codes in Asterisk Programming Language。

像我,我用的 ...
角色 發表於 2010-10-3 20:26



    我不會寫Asterisk Programming Language

TOP

就是只安装Asterisk 1.6 然后自己写programming codes in Asterisk Programming Language。

像我,我用的是Asterisk 1.4。

角色

TOP

如果只用Asterisk 1.6,不用freepbx是否有问题呢?

角色
角色 發表於 2010-10-3 19:28



    怎樣只用Asterisk 1.6?

TOP

如果只用Asterisk 1.6,不用freepbx是否有问题呢?

角色

TOP

[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/104-00000004", "0?sub-pincheck,s,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/104-00000004", "0?disabletrunk,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:4] Set("SIP/104-00000004", "DIAL_NUMBER=63035127") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:5] Set("SIP/104-00000004", "DIAL_TRUNK_OPTIONS=tr") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:6] Set("SIP/104-00000004", "OUTBOUND_GROUP=OUT_1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/104-00000004", "0?nomax") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/104-00000004", "0?chanfull") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/104-00000004", "0?skipoutcid") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:10] Set("SIP/104-00000004", "DIAL_TR[quote]UNK_OPTIONS=") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:11] Macro("SIP/104-00000004", "outbound-callerid,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/104-00000004", "0?Set(CALLERPRES()=)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/104-00000004", "0?Set(REALCALLERIDNUM=104)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/104-00000004", "1?normcid") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-outbound-callerid,s,6)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:6] Set("SIP/104-00000004", "USEROUTCID=") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:7] Set("SIP/104-00000004", "EMERGENCYCID=") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:8] Set("SIP/104-00000004", "TRUNKOUTCID=23177070") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/104-00000004", "1?trunkcid") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-outbound-callerid,s,12)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/104-00000004", "1?Set(CALLERID(all)=23177070)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/104-00000004", "0?Set(CALLERID(all)=)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/104-00000004", "0?Set(CALLERID(all)=)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/104-00000004", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/104-00000004", "1?sub-flp-1,s,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@sub-flp-1:1] ExecIf("SIP/104-00000004", "1?Set(TARGET_FLP41=85263035127)") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@sub-flp-1:2] GotoIf("SIP/104-00000004", "1?match") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (sub-flp-1,s,4)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@sub-flp-1:4] Set("SIP/104-00000004", "DIAL_NUMBER=85263035127") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@sub-flp-1:5] Return("SIP/104-00000004", "") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:13] Set("SIP/104-00000004", "OUTNUM=85263035127") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:14] Set("SIP/104-00000004", "custom=DAHDI/g0") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/104-00000004", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:16] Macro("SIP/104-00000004", "dialout-trunk-predial-hook,") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/104-00000004", "") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/104-00000004", "0?bypass,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/104-00000004", "0?customtrunk") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:19] Dial("SIP/104-00000004", "DAHDI/g0/85263035127,300,") in new stack
[Oct 2 20:32:03] WARNING[3756] app_dial.c: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
[Oct 2 20:32:03] VERBOSE[3756] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:20] NoOp("SIP/104-00000004", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-dialout-trunk:21] Goto("SIP/104-00000004", "s-CHANUNAVAIL,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/104-00000004", "RC=0") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/104-00000004", "0,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-dialout-trunk,0,1)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [0@macro-dialout-trunk:1] Goto("SIP/104-00000004", "continue,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-dialout-trunk,continue,1)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/104-00000004", "1?noreport") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Goto (macro-dialout-trunk,continue,3)
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/104-00000004", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other trunks") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [continue@macro-dialout-trunk:4] Set("SIP/104-00000004", "CALLERID(number)=104") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [963035127@from-internal:7] Macro("SIP/104-00000004", "outisbusy,") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outisbusy:1] Progress("SIP/104-00000004", "") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outisbusy:2] GotoIf("SIP/104-00000004", "0?emergency,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outisbusy:3] GotoIf("SIP/104-00000004", "0?intracompany,1") in new stack
[Oct 2 20:32:03] VERBOSE[3756] pbx.c: -- Executing [s@macro-outisbusy:4] Playback("SIP/104-00000004", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
[Oct 2 20:32:03] VERBOSE[3756] file.c: -- <SIP/104-00000004> Playing 'all-circuits-busy-now.gsm' (language 'en')
[Oct 2 20:32:04] VERBOSE[3756] file.c: -- <SIP/104-00000004> Playing 'pls-try-call-later.gsm' (language 'en')


係google找到係chan_dahdi.c改
但係唔知果個野放左係邊
https://issues.asterisk.org/view.php?id=15619
1. In globals, the var is created as trunk_1 = DAHDI/trunk_1.
Observation: Asterisk has no clue what to do with this in chan_dahdi.c

2. After changing trunk_1 = DAHDI/trunk_1 to trunk_1 = DAHDI/g1, the first channel in the trunk works, but none of the other ones do. Asterisk replies with congestion message in CLI even though the 2 other lines in the defined trunk are free.

The analog trunk is defined as having ports 1, 2 and 3 using SVN revision 4970 of the gui.

TOP

返回列表