h1. Difference in billing with partner In case if your partner sends you invoice, and it doesn't match with billing reports of Smartswitch, you should perform following checks: 1. Compare partner's data with [[Code report]] for the same period. In case if peer sends invoice in time zone which differs from Smartswitch's, you should specify *peer's time zone* in partner's configuration and when generating report you should set check box *peer time zone*. 2. If the number of answered calls matches or there is a small difference, however the number of minutes and/or cost significantly differs - likely billing parameters for destination codes have been configured wrong. You should check data for each destination code until you find destination code which has difference. After finding such a code you should check billing parameters for it. In case if you need to fix price configuration in Smartswitch - perform the fix and then execute [[Redo billing]] with disabled check box *synchronize billing cache only* for that period. 3. In case if the number of answered calls doesn't match - partner has greater amount of calls - perhaps you already executed [[Redo billing]] and calls have been left without "Billing" tab after re-calculation. The reason could be that in period of interest you have already executed [[Redo billing]] with new prices, and new prices didn't have price for the call, which has happened earlier and therefore "Billing" tab of a call has been deleted. To check this you should take destination code, which has difference and which has minimal number of calls. After finding this code you should check billing parameters for it. For this you could use [[Call detail report]] - look for *Billing* tab, search for answered calls which doesn't have this tab. To fix see i.2. Also you can quickly find such codes when performing comparison of [[Code report]] with [[Statistics report]] for the same period for specific destination code. 4. In case if the number of answered calls doesn't match and [[Redo billing]] definitely hasn't been executed (see i. 3) - perhaps there has happened [[Billing|billing caches]] disalignment. To check this perform comparison of [[Code report]] with [[Statistics report]] for the same period. In case if there is a significant duration or answered calls quantity difference -disalignment is possible. Disalignment can be caused by a sudden system reboot or for example, mistake when performing version update. You should perform [[Redo billing]] with enabled check-box *synchronize billing cache only* for this period. 5. In case if after performing above steps the difference in quantity of answered calls is still present, you should ask your partner for day-by-day statistics. After this you should perform steps above for each day and find exact day in which the difference happened. 6. (optional) Ask your partner for hour-by-hour statistics and compare it with [[Statistics report]]. Find hour in which difference happened. 7. Ask your partner for detailed CDR report for hour or day of interest. Perform [[CDR comparison]] and determine the reason for difference. In case if Smartswitch has calls which are absent at peer's side - send him a list. In case if partner has calls which are absent on Smartswitch - perform search in /var/log/smartswitch/asterisk.log by caller or callee ID. In case if the call has been handled - it has to be present there. After call is found you should check which errors have been logged during call processing which prevented the call from storing in billing. [[Расхождение биллинга с партнером|Русский перевод]]