A
A
Andrey Kravchuk2015-02-08 16:19:58
Asterisk
Andrey Kravchuk, 2015-02-08 16:19:58

How to make Dial correctly send signals during dialing after playing a message to the caller?

Problem in the following:
With the help of a call file I organize a call.
The call file itself calls the SIP subscriber. As soon as he picks up the phone, the call goes to the special extension
[webcallback]
exten => 200,1,AGI(say.php,"Hello")
same => n,AGI(say.php,"Customer callback")
same => n,Dial(SIP/sip-trunk1/${cbclientnum})
same => n,Hangup()
agi script say.php is a script for playing google tts. Receives a file, converts it and sends it with the STREAM FILE command, nothing out of the ordinary.
What happens in this case: the subscriber called from the call-file (subscriber No. 1) picks up the phone, hears a greeting, after which the dialing of the second party (subscriber No. 2) begins. The problem is that subscriber No. 1 does not hear call signals on the line at this time. Just silence, and then caller #2 picks up the phone. And if the call is rejected, then short beeps are heard, as expected. Tried the "r" parameter in the Dial command. Beeps are simulated, but incorrectly. If subscriber number 2 rejects the call, then both long beeps and short beeps are heard immediately. How to send "real" call signals to subscriber #1 when dialing subscriber #2?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Skogorev, 2015-03-29
@EnterSandman

progressinband=yes to peer setup

M
Mercury13, 2017-09-25
@sasha31299

1. 1/2 = 0, write 1.0/2.0 or just 0.5.
2. Printf has slightly different rules than scanf, and you need to
printf_s("max = %f\n", max);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question