How to play announcement without calling party

Hi guys, I’m newsterisk, I have the following task, and i don’t know how to solve it.

I have a context with its own default extension

exten => s,1,Answer()
        same => n,Dial(SIP/817,10,tTwWA(demo-congrats))
        same => n,Hangup()

I run it with originate command in CLI, or in AMI via telnet.

originate SIP/814 extension s@my-context

It’s simple and works in sequence

  1. SIP/814 ringing
  2. I answer SIP/814
  3. SIP/817 ringing
  4. Another guy answers SIP/817
  5. Playing announcement at SIP/817
  6. Hangup

But it does not match my requirement yet, I don’t want the calling party (SIP/814 in this case) to join the sequence, I just want to give the called party (SIP/817) the announcement, and I don’t know how to do that stuff.

Btw, when called party is from the DAHDI source (eg DAHDI/1/${my-cellphone-number}), the announcement played before I accept the call, so I just can hear end part of the announcement. How would I fix that? :question:

Any help would be appreciated.
Best Regard
Loi Dang

  1. Use the subroutine option of the dial application.

  2. Use ISDN rather than analogue, or get a line with answer supervision and configure Asterisk to use it. Asterisk supports line reversal answer supervision. Enabling it in Asterisk when the network operator hasn’t enabled it on the line will result in Asterisk assuming the call has never been answered. Any non-trivial use of the PSTN should always interface vis ISDN; that is is how ITSPs interface. Analogue lines often don’t have any supervision and those with disconnect supervision cannot distinguish between CLEAR and RELEASE, so you can have to wait for the network RELEASE timeout before an outgoing call clears.

Thank you so much for help, David
But I think I don’t need to use the subroutine, I just need to to use the originate call

originate SIP/817 Application Playback demo-congrats

And It works
In the other hand, I’m gonna use ISDN, but yet, so I’ll have the answer soon
Best Regards
Dang Loi