I would like to do something probably simple : when a user takes his phone, before to hear the beep signal, a voice tell him how many message are waiting in his voicebox and after he can make a normal call
My question is where to catch this event and how after the agi script let the user to continue to dial who he wants ?
You will need to use analogue phones for this as VoIP phone do on hook dialling, which means that the first thing the PABX knows about the call is when the number called arrives.
To make it work with SIP, you need to configure the phone to automatically dial a preset number.
Most phone models have “Acrion URL” off hook being on of the actions, not real sure how you’d get this work but that’s the only method to determine the handset has been lifted off hook