A2Billing 的回撥功能依據使用方法不同,大致區分為:
回撥電話的流程說明:
對於要使用 Callback 的 A2B, 必須完成以下設置:
Python 套件
yum install python-setuptools MySQL-python
Python 模組 - sqlalchemy
easy_install sqlalchemy
開始設定
cd /usr/src/a2billing cd CallBack/callback-daemon-py cp build/lib/callback_daemon/a2b-callback-daemon.rc /etc/init.d/a2b-callback-daemon chmod +x /etc/init.d/a2b-callback-daemon cp dist/callback_daemon-1.0.prod-r1528.tar.gz /tmp cd /tmp tar xvfz callback_daemon-1.0.prod-r1528.tar.gz cd callback_daemon-1.0.prod-r1528 python setup.py build python setup.py bdist_egg easy_install dist/callback_daemon-1.0.prod_r1528-py2.4.egg chkconfig --add a2b-callback-daemon service a2b-callback-daemon start chkconfig a2b-callback-daemon on
"2011-06-24 13:56:42,538 - root - MainThread - INFO - [<callback_daemon.database.CallBack_Spool obje
ct at 0xb5aadd4c>]"
"2011-06-24 13:56:42,551 - root - MainThread - INFO - try_originate : SIP/sip2sip-0/800677522 : 1000
: a2billing-callback"
"2011-06-24 13:56:42,552 - root - MainThread - INFO - CallBack Status : Error"
"2011-06-24 13:56:42,557 - root - MainThread - INFO - [2011/06/24 13:56:42] Placed 17 calls"
"2011-06-24 13:56:47,703 - root - MainThread - INFO - waiting..."
Ans: 有兩項需要檢查
[myasterisk] secret = mycode deny = 0.0.0.0/0.0.0.0 permit = 127.0.0.1/255.255.255.0 read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan write = system,call,agent,user,config,command,reporting,originate
[2011-06-24 14:13:50] VERBOSE[6569] manager.c: == Manager 'myasterisk' logged off from 127.0.0.1
[2011-06-24 14:13:50] NOTICE[6701] manager.c: 127.0.0.1 failed to authenticate as 'myasterisk'
[2011-06-24 14:13:51] VERBOSE[6701] manager.c: == Connect attempt from '127.0.0.1' unable to authenticate
Ans: 檢查 A2B > CALLBACK > Server > 這裡的資訊必須與 /etc/asterisk/manager.conf 相符。