Finding answered and no answer calls using AMI

Hi friends.
i want to find the answered and unanswer calls and write a php code for that. Is there any way for that? (I dont want to use the cdr table and query on db)

https://docs.asterisk.org/Development/Roadmap/Asterisk-11-Projects/AMI-Event-Documentation/

you are looking for he ‘DialStatus’ in the ‘end’ sub event of a ‘dial’ event.

tnx alot. do you now how can i find the operator number and name with ami?

That depends on what you mean by operator and name, Asterisk is a B2BUA so most calls have two legs they are linked by uniqueid and destuniqueid most of the ‘connective tissue’ of a call is already done in the cdr/cel tables, but if you won’t use those, you will have recreate that associative logic connecting call legs yourself.

tnx.
about dialstatus, just now i take a look to answered an unanswer call logs with ami but there is not any dial event and dialstatus.

The manager account used must have adequate rights to read the events you are interested in.

my ami user have this rights:
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message

write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message

Are you looking for call logs of past calls?

no, i want to when someone calls to my company, if the call not answered, i can sent a sms to the caller. so in every call i need to now if this call answered or not

I would do that by adding a ‘trigger after insert’ to the asteriskcdrdb cdr table.