How to record call only after both channel established in channel?

Suppose there are 2 users, User1 and User2.
User1 call User2, when User1 dial User2’s extension a channel is established and when User2 received call then both channel placed in bridge and communication take follow.

But is there anyway, to record only after User2 accepts or receives a call from User1.

b option on MixMonitor, or request the monitor from a U option Dial subroutine.

1 Like

Its simple go to extension.conf file in your asterisk server and paste the following

exten => _X,1,NoOp()
exten => _X,n,MixMonitor(${EXTEN}.wav,ab)

exten => _X,n,Dial(SIP/${EXTEN})
exten => _X,n,StopMixMonitor()
exten => _X,n,Hangup()

here “MixMonitor(${EXTEN}.wav,ab)” MixMonitor will be activate to record the call in wav format
and u can check the saved files in “/var/spool/asterisk/monitor”. The filename will be saved as the caller extension. Here “ab” means when the bridge and communication is eastablished. Only then the call will strat recording.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.