asteriskdialplan

Send pulse before call answer


Problem: I bought a local DID and when I call it the phone is mute until the connection is executed in Asterisk and then immediately begins the synthesized speech.

How it should be: I would like to make the customer's phone (who is calling) hear the pulse sound a few times. When I call a normal number, even before the other phone rings, it starts to hear pulse sounds. PS: On my DID server you have no option to configure anything.

How I did it: I bought a local phone number (DID) that automatically redirects to a SIP from the same service. So I set up my Asterisk server to connect to this SIP account, and the dialplan tried to put a wait value in the answer, but it did not work.

I tried to put a value for the "Answer(5)" command, but the result was: The call is answered, it is silent for 5 seconds and then it executes the next command. When I would like to sound the pulse before showing the answered call. (Before answering the call my dialplan takes 2 seconds to open the necessary settings)


Solution

  • Send Progress() then Ringing() or PlayTones(ring)

    I've seen a few providers where we've needed to indicate ringing by way of early media, e.g.:

    exten => 500,1,Progress()
    exten => 500,n,Wait(1)
    exten => 500,n,Dial(PJSIP/121)
    exten => 500,n,Hangup()
    

    or

    exten => 500,1,Progress()
    exten => 500,n,PlayTones(ring) <-- OR USE MAYBE Ringing() HERE INSTEAD?
    exten => 500,n,Dial(PJSIP/121)
    exten => 500,n,Hangup()
    

    etc…

    See also

    https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Dialplan+Applications: