You need to attach the phone call handler - an event that is triggered every time the mobile device receives a call.
Code
&OnClient
AttachCallHandler(ConnectHandler)
If NO TelephonyTools.CallsHandlingSupported() Then
// call processing is not supported
Return;
EndIf;
Handler = New NotifyDescription("CallsProcessing", ThisObject, "Parameters");
If ProcessCallEvents Then
TelephonyTools.AttachCallsHandler(Handler);
Else
TelephonyTools.DetachCallsHandler();
EndIf;
EndProcedure
CallHandlerProcedure(PhoneNumber, Date, Event Option, CallType, AdditionalParameters) Export
// Write your code here
EndProcedure