L
L
ld66666666666662019-03-11 15:23:09
Asterisk
ld6666666666666, 2019-03-11 15:23:09

How to implement stop recording on an asterisk?

Good day! Help to implement stop recording when pressing the grate, the code itself works like this:

[regtmp332]
exten => s,1,AGI(say.php,"После сигнала скажите как вас звовут.")
exten => s,n,AGI(say.php,"из какого вы города.") 
exten => s,n,AGI(say.php,"Расскажите немного о себе.")
exten => s,n,Playback(beep) 
exten => s,n,Monitor(wav,/var/www/html/chatreg/${regid})
exten => s,n,Wait(15)
exten => s,n,StopMonitor
exten => s,n,AGI(say.php,"Спасибо за регистрацию, активация аккаута занимает до 5 часов.")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill, 2019-03-11
@ld6666666666666

Read about features and do something similar for yourself:
extensions.conf:

[macro-pause-recording]
exten => s,1,Verbose(Stopping Recording)
exten => s,n,StopMixMonitor()

[macro-unpause-recording]
exten => s,1,Verbose(Resuming Recording)
exten => s,n,MixMonitor(${REC_FILE_NAME},a)

features.conf
StopMixMonitor   => #00,peer/both,Macro(pause-recording)
MixMonitor => #01,peer/both,Macro(unpause-recording)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question