DAHDI Hangup and answer problem

Hi
I have an Atcom AX 400P PCI Card with one FXO and one FXS module.I two problems with dahdi:

  1. Asterisk cann’t detect the hangup on FXO port! when I call FXO port if i hangup within the execution of dial plans, asterisk does not detect and continues the dial plan!
  2. when i dial an outgoing call through the FXO port the Dial application does not wait until answer of my callee! For example i have this:
    Dial(DAHDI/4/1234567)
    Playback(hello-world)
    as soon as execution of this application i have this log:
    DADHI/4-1 answered
    then 1234567 rings and when 1234567 answered no thing happened!!
    Or another test: I make a call file like this:
    Channel: DAHDI/4/1234567
    Context: call-file
    Extension: s
    Priority: 1
    and call-file context is like this:
    [call-file]
    exten => s,1,Playback(hello-world)
    but as soon as call file created and the dial started, I have the log DAHDI answer and Playback executes but 1234567 does not ring even!!!

You have neither answer nor disconnect supervision. What options does your PTT provide for these? Which if any do they actually have set on your line?

A typical answer supervision technique is reversing the line polarity.

A typical disconnect technique is to open circuit the line for a short time, although removing the polarity reversal is also possible.

I think Asterisk can also be configured to listen for a busy tone for disconnect supervision.

If you try an enable answer supervision on a line for which the PTT doesn’t provide it, calls will never appear to be answered.

I don’t know about PTT.
I test both polarity options for hang and answer and busy count too, none of them work! But perhaps I make mistake in configuring these test. Would you please guide me more about these tests configuration?
I know just when I Dial(DAHDI/4/123456) I have this log DADHI//4-1 answered before even the ringing of 123456!
Can be the ADSL enabled lines the problem? Or for example using ADSL splitter?

Chances are that your PTT (telephone operator) doesn’t provide this service on the sort of line you are using. In case they do, you need to talk to them.

I just know my line is DLC line! Can be the reason?

That would probably reduce the choices, but wouldn’t necessarily mean you couldn’t have supervision.

Once you know what supervision you have, you need to modify chan_dahdi.conf to match it.

which configurations you think I should change and test? there are lots of configurations in that file!

busydetect through polarityanswerdelay, plus ringtimeout, and possibly even those between.

However, you should not try and test, you should find out what if anything your telephone operator actually provides. They may not provide anything, in which case you will be wasting your time trying to discover it by trial and error.

One thing I should point out is that the person here who knows most about dahdi configuration is a Digium employee and their standard answer would be to ask the card supplier for support. I believe he believes that Digium provide good support to their customers and that any other supplier should be expected to provide that degree of support.

I imagine they will want to know which country your are in, your network operator, and the product name of the service that they are supplying to you.

I test my project with a Grandstream H503 voipgateway and it works properly!
For hangup Problem:
I find that i should configure the gateway FXO disconnet tone like this for my country(Iran):
f1=425@-32,f2=0@-32,c=250/250;
and I wana know how should I configure in asterisk?!

For answer Problem:
I think this is like the two stage method of dialing! (First you dial an extension,when you get the dial tone and then dial the destination) and I think getting the dial tone for asterisk is something like answering the phone! Isn’t it?
If my supposition is correct how should i configure the 1 stage method for dialing?

Regards