How to detect callee answer when outbound call via fxo card?

I used Asterisk and Fxo card for connect to PSTN, I know that when callee answer it will return 200OK via SIP Protocol, so I can get that value in my PHP. But in FXO card (DADHI) how can I know when callee answer?

thank you for help and sorry for my bad english.

Ask your PSTN operator to enable line reversal answer supervision and then enable that in chan_dahdi.conf (I think the option uses the word “polarity”). As far as I know that is the only form of answer supervision that Asterisk will support.

Otherwise you are going to have to run subroutine to do thinks like listen for silence.

If you enable it in chan_dahdi and it isn’t enabled on the line, the call will never get past ringing.

This was the wrong forum for support questions.