### Description
Incoming Invite triggers CCR toward OCS.
In CCA with Result-Code DIAMETER_SUCCESS (2001) missing Result-Code in
Multiple-Services-Credit-Control AVP.
Kamailio handles this successful charging transaction as a failure in the following
lines:
if (ro_cca_data->mscc->resultcode != 2001) {
LM_DBG("CCA failure at MSCC level with resultcode [%d]\n",
ro_cca_data->mscc->resultcode);
error_code = RO_RETURN_FALSE;
goto error1;
}
The resultcode is mandatory in this statement, so if Multiple-Services-Credit-Control AVP
does not contain Result-Code which is optional according to RFC 4006 the charging
transaction is considered as failed.
#### Reproduction
To reproduce the issue the diameter CCA should look as following:
Diameter Protocol
Version: 0x01
Length: 392
Flags: 0x40, Proxyable
Command Code: 272 Credit-Control
ApplicationId: Diameter Credit Control Application (4)
Hop-by-Hop Identifier: 0x66ea324d
End-to-End Identifier: 0x8777d597
[Request In: 2623]
[Response Time: 0.457246000 seconds]
AVP: Session-Id(263) l=52 f=-M- val=ar.voice-pre-5.domain.int;843835511;1
**AVP: Result-Code(268) l=12 f=-M- val=DIAMETER_SUCCESS (2001)**
AVP: Auth-Application-Id(258) l=12 f=-M- val=Diameter Credit Control Application (4)
AVP: CC-Request-Type(416) l=12 f=-M- val=INITIAL_REQUEST (1)
AVP: CC-Request-Number(415) l=12 f=-M- val=0
AVP: CC-Session-Failover(418) l=12 f=-M- val=FAILOVER_NOT_SUPPORTED (0)
AVP: Unknown(12018) l=45 f=VM- vnd=12239
val=31363239386664653539382d303030303465363864343333...
AVP: Unknown(12019) l=76 f=VM- vnd=12239
val=00002ef4c000001800002fcf532e5441522e30302e303030...
AVP: Unknown(12011) l=16 f=VM- vnd=12239 val=00000000
**AVP: Multiple-Services-Credit-Control(456) l=56 f=-M-
AVP Code: 456 Multiple-Services-Credit-Control
AVP Flags: 0x40
AVP Length: 56
Multiple-Services-Credit-Control:
000001af40000014000001a44000000c0000005a00000364...
AVP: Granted-Service-Unit(431) l=20 f=-M-
AVP: Time-Quota-Threshold(868) l=16 f=V-- vnd=TGPP val=127.0.0.1**
AVP: Origin-Host(264) l=15 f=-M- val=sim-dra
AVP: Origin-Realm(296) l=29 f=-M-
val=tlf-ar.ocs.com
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST,
DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC,
DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 13:24:45 Apr 7 2018 with gcc 4.9.2
```
* **Operating System**:
```
Linux voice-pre-5 4.9.0-0.bpo.2-amd64 #1 SMP Debian 4.9.18-1~bpo8+1 (2017-04-10) x86_64
GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1505