VOIP Settings 是用來設定 SIP/ IAX 的設定參數,這裡的修改會針對設定檔 additional_a2billingip.conf。
如果因系統需要增加頁面沒有的 SIP/IAX 的參數,可以參考以下作法:
例如要加入的參數名為 call_limit
1. 資料庫的 Table cc_sip_buddies 增加一個欄位,並且名稱命名為 call_limit。
mysql> ALTER TABLE cc_sip_buddies ADD call_limit;
2. 編輯 /var/www/html/A2Billing_UI/Public/form_data/FG_var_friend.inc
注意看 call_limit 的部份
getpost_ifset(array('defaultuser', 'subscribemwi', 'vmexten', 'cid_number', 'callingpres', 'usereqphone', 'incominglimit', 'subscribecontext', 'musicclass', 'mohsuggest', 'allowtransfer', 'autoframing', 'maxcallbitrate', 'outboundproxy', 'regserver', 'rtpkeepalive', 'call_limit', 'dbsecret ', 'regcontext ', 'sourceaddress ', 'mohinterpret ', 'mohsuggest ', 'inkeys ', 'outkey ', ' sendani ', 'fullname ', ' maxauthreq ', 'encryption ', 'transfer ', 'jitterbuffer ', 'forcejitterbuffer ', 'codecpriority ', 'qualifysmoothing ', 'qualifyfreqok ', 'qualifyfreqnotok ', 'timezone' , 'adsi'));
選一個類似欄位的寫法,複製然後將名稱改成你要的。
$HD_Form -> AddEditElement (gettext("CALL-LIMIT"), "call_limit", '', "INPUT", "size=10 maxlength=10", "", "", "" , "", "", "", "", "", "", "" );
注意 IF 的上下段,上段是 SIP;下段是 IAX
if ($atmenu=='sip') { $field_list_edit .= ', username, md5secret, nat, dtmfmode, canreinvite, callgroup, fromuser, fromdomain, insecure, mailbox, mask, pickupgroup, restrictcid, rtptimeout, rtpholdtimeout, ' . 'musiconhold, cancallforward, defaultuser, subscribemwi, vmexten, callingpres, usereqphone, incominglimit, subscribecontext, musicclass, mohsuggest, allowtransfer, ' . 'autoframing, maxcallbitrate, outboundproxy, regserver, rtpkeepalive, call_limit'; } else { $field_list_edit .= ', trunk, dbsecret , regcontext , sourceaddress , mohinterpret , mohsuggest , inkeys , outkey , sendani , fullname , maxauthreq , encryption , transfer , jitterbuffer , ' . 'forcejitterbuffer , codecpriority , qualifysmoothing , qualifyfreqok , qualifyfreqnotok , timezone , adsi, requirecalltoken, maxcallnumbers, maxcallnumbers_nonvalidated'; }
3. 編輯