> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register an incoming call

> How to register an incoming call with CRMScript

The **activity type** for phone calls is 5. By default, the direction is *incoming*.

This example code will register an incoming call with a description, starting now, and lasting 10 minutes.

```crmscript theme={null}
DateTime start;
DateTime end;
end.addMin(10);

NSAppointmentAgent appointmentAgent;
NSAppointmentEntity incomingCall = appointmentAgent.CreateDefaultAppointmentEntityByTypeAndAssociate(5, 1);

incomingCall.SetActiveDate(start);
incomingCall.SetStartDate(start);
incomingCall.SetEndDate(end);
incomingCall.SetDescription("My favorite customer calling re migration.");

incomingCall = appointmentAgent.SaveAppointmentEntity(incomingCall);
```

## Related topics

* [NSAppointmentAgent][1]
* [NSAppointmentEntity][2]
* [About phone calls][3]

[1]: /en/automation/crmscript/reference/CRMScript.NetServer.NSAppointmentAgent

[2]: /en/automation/crmscript/reference/CRMScript.NetServer.NSAppointmentEntity

[3]: ../../../../diary/learn/follow-ups#call


## Related topics

- [Dial contacts](/en/contact/learn/dial.md)
- [Plan an outgoing call](/en/automation/crmscript/howto/diary/plan-outgoing-call.md)
- [Enable caller ID](/en/mobile/caller-id.md)
- [Respond to a chat](/en/chat/learn/respond.md)
- [Archive email messages](/en/email/inbox/learn/archive.md)
- [Authenticate Incoming](/en/api/reference/restful/agent/email_agent/authenticate-incoming.md)
