Custom extension not receiving callerid name from phonebook

Dear Sirs may i ask you please
(Asterisk version 11.14.2)
i have a custom extension in a queue (together with other sip extensions) with a dial plan to send an email upon incoming call

It is this:

[send-email]
exten => s,1,NoOp(Entering user defined context [send-email] in extensions_custom.conf)
exten => s,n,Set(CALLERID(name)=${CALLERID(name)})
exten => s,n,System(echo ‘Call from ${CALLERID(name)} at ${CALLERID(number)} ’ | mail -s ’ incoming call’ ‘panta2@gmail.com’)
exten => s,n,hangup()


the problem is that it doesn’t show the CALLERID(name) stored in the phonebook only the number.
However if no ones answers the voice mail successfully sends an email with the name (from the phonebook) and number of the caller

Do you have any idea of what to change?Thanx

This line does nothing, as it sets a field to a value it already had.

Also, nothing in your dialplan results in the recording of voice mail, and this board does not support the operation of the FreePBX dialplan.

1 Like

Additionally Asterisk has no phonebook built in, it has the primitives necessary to implement such a thing - but does not have one. That logic would be written by someone/something else.

1 Like

Thank you for your time