Asterisk playback starts before called side answers


Im tring to play sound to a dahdi channel, all goes ok till the point where the file it self is played before the called side answers. Any idea why would this happen?

Here is the cli output if I use the Playback application directly:

Channel DAHDI/3-1 was answered.
Launching Playback(xxxx) on DAHDI/3-1
– <DAHDI/3-1> Playing ‘xxxx.slin’ (language ‘en’)
– Hanging up on ‘DAHDI/3-1’
– Hungup ‘DAHDI/3-1’

This all happens before the line is answered on the caller side. If person answering is fast it can hear some part of the message

I tried also with a call file and a play context, e.g:


Channel: dahdi/3/xxxxxx
CallerID: <3333>
Context: play_sound
Extension: 100
Priority: 1


exten => 100,1,Dial(Local/100@play_sound,15,S(60))

exten => 100,1,Set(repeatCount=5)
exten => 100,n(playback),Playback(xxxx)
exten => 100,n,Set(repeatCount=$[${repeatCount} - 1])
exten => 100,n,GotoIf(GotoIf($[${repeatCount} = 0]]?exit:playback)
exten => 100,n(exit)Hangup()

cli output
> Channel DAHDI/3-1 was answered
– Executing [502@play_xxxx:1] Set(“DAHDI/3-1”, “repeatCount=2”) in new stack
– Executing [502@play_xxxx:2] Playback(“DAHDI/3-1”, “xxxx”) in new stack
– <DAHDI/3-1> Playing ‘xxxx.slin’ (language ‘en’)
– Executing [502@play_xxxx:3] Set(“DAHDI/3-1”, “repeatCount=1”) in new stack
– Executing [502@play_xxxx:4] GotoIf(“DAHDI/3-1”, “GotoIf(0]?exit:playback”) in new stack
– Goto (play_vozilonalokacija,502,5)
== Spawn extension (play_xxxx, 502, 5) exited non-zero on ‘DAHDI/3-1’
– Hanging up on ‘DAHDI/3-1’
– Hungup ‘DAHDI/3-1’

So looks like the same, file always played before answer on other side…

What is the underlying channel technology? An analog line?

Specifically, unless you configure an analogue channel for answer supervision, it will be assumed to be answered when dialling is complete. If you configure answer supervision that doesn’t match what the PTT provides, or they don’t provide any, no outgoing calls will be answered.

@jcolp yes the underline technology is analog line

@david55 Im not sure if I catch it correct, but I need to try to set up un analog line answer supervision? Where I can do that? At least I can try if the provider can catch this…

In chan_dahdi.conf. The most common answer supervision is line reversal.


just as info!


in chan_dahdi, worked for me fine.

Tnx for the reply!