Ok Vulcan, I modified the files as patches (attached). I've renamed txt to attach them.
To Class.A2Billing.txt, I applied before star194.txt and after star194b.txt (check if I did something wrong).
Unfortunately, the result does not change...
I tried with this particular situation:
The user B has a VoIP number 0863185XXXX, which also responds to the ported number 0863528XXX.
In FreePBX-Inbound Routes->DID Number 0863185XXXX->Custom Destination->a2billing-did; In A2Billing Inbound DID 0863185XXXX->Destination->sip/38209XXXXX.
If User A (with "In Use at 0"), calls user B (with "In Use at 0"), using the DID 0863185XXXX, the call is internal (Inbound DID 0863185XXXX->Destination->sip/38209XXXXX), and hangs up before answering, the "In Use" of the user A changes to 1, and that of the user B changes to -1
During the call (I refresh the page), "In Use" of the user A goes to 1, while "In Use" of the user B stays at 0.
At the end of the call (no answer), "In Use" of the user A stays 1, while "In Use" of the user B goes to -1
If instead the same user A, calls the same user B, using the DID 0863528XXX, the call goes to the outside and then go back to FreePBX (In FreePBX-Inbound Routes->DID Number 0863185XXXX->Custom Destination->a2billing-did; In A2Billing Inbound DID 0863185XXXX->Destination->sip/38209XXXXX), and hangs up before answering, the "In Use" of the user A and user B remain at 0.
During the call (I refresh the page), "In Use" of the user A goes to 1, and "In Use" of the user B go to 1.
At the end of the call (no answer), "In Use" of the user A goes to 0, and "In Use" of the user B goes to 0.
Of course the same thing happens if I call from an outside telephone regarding the "In Use" of the user B: During the call, goes to 1, and the term goes to 0.
I hope these my instructions, can ... "enlighten"
Very Thanks, especially for the patience...
Corrado.