Hello,
I am currently forward deployed with my regiment overseas and we have been using trixbox for almost a year. But due to constant dispute over who has to pay what bill especially for international calls, we finally resolved to experiment with a2billing:
I followed the step by step instructions provided at the link below:
http://trac.asterisk2billing.org/cgi-bi ... boxInstall ( many thanks for the script) and every thing was perfect!!!
All living in the same building and behind the router (public IP addr) where the trixbox is connected are able to register as a2billing SIP friends, make calls and see every detail at the customer interface.
Now we are trying to extend the experiment to other friends living in the barracks with very little success :
When registered as FreePBX SIP Friends , they can place calls using available trunks with no problem but when registered as A2billing SIP friends , I can see from the CLI how the caller is authenticated, call gets initiated , the called number rings and the connection drops within seconds
My question is how can you configure A2billing on a tribox with a Public IP address to enable outside calls from SIP friends?
Below are the debug lines from the CLI and any help will be grately appreciated
musiconhold,
tp_trunk.failover_trunk AS tp_failover_trunk,
rt_trunk.failover_trunk AS rt_failover_trunk,
tp_trunk.addparameter AS tp_addparameter_trunk,
rt_trunk.addparameter AS rt_addparameter_trunk,
id_outbound_cidgroup,
freetimetocall_package_offer, freetimetocall, packagetype, billingtype, startday, id_cc_package_offer
FROM cc_tariffgroup
RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup.id=3
INNER JOIN cc_tariffplan ON (cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan )
LEFT JOIN cc_ratecard ON cc_ratecard.idtariffplan=cc_tariffplan.id
LEFT JOIN cc_trunk AS rt_trunk ON cc_ratecard.id_trunk=rt_trunk.id_trunk
LEFT JOIN cc_trunk AS tp_trunk ON cc_tariffplan.id_trunk=tp_trunk.id_trunk
LEFT JOIN cc_package_offer ON cc_package_offer.id=cc_tariffgroup.id_cc_package_offer
WHERE (dialprefix=SUBSTRING('97336555137',1,length(dialprefix)) OR dialprefix='defaultprefix')
AND startingdate<= CURRENT_TIMESTAMP AND (expirationdate > CURRENT_TIMESTAMP OR expirationdate IS NULL OR LENGTH(expirationdate)<5)
AND startdate<= CURRENT_TIMESTAMP AND (stopdate > CURRENT_TIMESTAMP OR stopdate IS NULL OR LENGTH(stopdate)<5)
AND (starttime <= 9815 AND endtime >=9815)
AND idtariffgroup='3'
AND ( dnidprefix=SUBSTRING('01197336555137',1,length(dnidprefix)) OR (dnidprefix='all' AND 0 = 0))
AND ( calleridprefix=SUBSTRING('6178607611',1,length(calleridprefix)) OR (calleridprefix='all' AND 0 = 0))
ORDER BY LENGTH(dialprefix) DESC
]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:192]:[CallerID:6178607611]:[CN:6178607611]:[[rate-engine: Count Total result 2]]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:281]:[CallerID:6178607611]:[CN:6178607611]:[[CC_asterisk_rate-engine: Count Total result 1]]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:282]:[CallerID:6178607611]:[CN:6178607611]:[[CC_asterisk_rate-engine: number_trunk 1]]
[01/07/2007 19:35:04]:[file:Class.A2Billing.php - line:722]:[CallerID:6178607611]:[CN:6178607611]:[OK - RESFINDRATE::> 1]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:294]:[CallerID:6178607611]:[CN:6178607611]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT (1.69800)]]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:300]:[CallerID:6178607611]:[CN:6178607611]:[[CC_RATE_ENGINE_ALL_CALCULTIMEOUT: k=0 - res_calcultimeout:1014]]
[01/07/2007 19:35:04]:[file:Class.A2Billing.php - line:744]:[CallerID:6178607611]:[CN:6178607611]:[RES_ALL_CALCULTIMEOUT ::> 1]
[01/07/2007 19:35:04]:[file:Class.A2Billing.php - line:761]:[CallerID:6178607611]:[CN:6178607611]:[TIMEOUT::> 1014 : minutes=16 - seconds=54]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:962]:[CallerID:6178607611]:[CN:6178607611]:[app_callingcard: Dialing 'SIP/ipmarx/97336555137|60|HRrL(1014000:61000:30000)' with timeout of '1014'.
]
[01/07/2007 19:35:04]:[file:Class.RateEngine.php - line:988]:[CallerID:6178607611]:[CN:6178607611]:[app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.]
[01/07/2007 19:35:14]:[file:Class.RateEngine.php - line:993]:[CallerID:6178607611]:[CN:6178607611]:[DIAL SIP/ipmarx/97336555137|60|HRrL(1014000:61000:30000)]
[01/07/2007 19:35:14]:[file:Class.RateEngine.php - line:1096]:[CallerID:6178607611]:[CN:6178607611]:[[USEDRATECARD=0]]
[01/07/2007 19:35:14]:[file:Class.RateEngine.php - line:825]:[CallerID:6178607611]:[CN:6178607611]:[[CC_RATE_ENGINE_UPDATESYSTEM: usedratecard K=0 - (sessiontime=0 :: dialstatus=CANCEL :: buycost=0 :: cost= : signe_cc_call=-: signe=+)]]
[01/07/2007 19:35:14]:[file:Class.RateEngine.php - line:849]:[CallerID:6178607611]:[CN:6178607611]:[[CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1183311294.628', 'SIP/6178607611-b7a44cb0', '6178607611', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '97336555137', 'CANCEL', now(), '0.1', '-0', '', '', 'bahrain mobile', '3', '11', '20061', '8', '6178607611', '0', '0.0633', '0', '0')]]
[01/07/2007 19:35:14]:[file:Class.RateEngine.php - line:852]:[CallerID:6178607611]:[CN:6178607611]:[[CC_asterisk_stop 1.1: SQL: DONE : result=1]]
[01/07/2007 19:35:14]:[file:a2billing.php - line:304]:[CallerID:6178607611]:[CN:6178607611]:[[a2billing account stop]]
[01/07/2007 19:35:14]:[file:a2billing.php - line:169]:[CallerID:6178607611]:[CN:6178607611]:[[CHANNEL STATUS : 6 = Line is up]]
[01/07/2007 19:35:14]:[file:a2billing.php - line:170]:[CallerID:6178607611]:[CN:6178607611]:[[CREDIT : 1.69800][CREDIT MIN_CREDIT_2CALL : 0]]
[01/07/2007 19:35:14]:[file:Class.A2Billing.php - line:657]:[CallerID:6178607611]:[CN:6178607611]:[0 && && 14&& 1]
[01/07/2007 19:35:14]:[file:Class.A2Billing.php - line:664]:[CallerID:6178607611]:[CN:6178607611]:[RES DTMF : -1]
[01/07/2007 19:35:14]:[file:Class.A2Billing.php - line:682]:[CallerID:6178607611]:[CN:6178607611]:[DESTINATION ::> -1]
[01/07/2007 19:35:14]:[file:Class.A2Billing.php - line:684]:[CallerID:6178607611]:[CN:6178607611]:[RULES APPLY ON DESTINATION ::> -1]
[01/07/2007 19:35:14]:[file:a2billing.php - line:169]:[CallerID:6178607611]:[CN:6178607611]:[[CHANNEL STATUS : -1 = There is no channel that matches SIP/6178607611-b7a44cb0]]
[01/07/2007 19:35:14]:[file:a2billing.php - line:170]:[CallerID:6178607611]:[CN:6178607611]:[[CREDIT : 1.69800][CREDIT MIN_CREDIT_2CALL : 0]]
[01/07/2007 19:35:14]:[file:Class.A2Billing.php - line:635]:[CallerID:6178607611]:[CN:6178607611]:[[CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='6178607611']]
[01/07/2007 19:35:14]:[CallerID:6178607611]:[CN:6178607611]:[[STOP - EXIT]]