Record call AMI

I need to register call

All must be done after I gave a command from PHP

To do this I wanted to lean on AMI or AGI

I made several attempts but can not find a suitable command …

I need the right command to start recording of a communication in the course … And I do not find!

Hi,

what about this?

pbxitd*CLI> agi show commands 
 Dead                        Command   Description
   No                         answer   Answer channel 
  Yes                 asyncagi break   Interrupts Async AGI 
   No                 channel status   Returns status of the connected channel. 
  Yes                   database del   Removes database key/value 
  Yes               database deltree   Removes database keytree/value 
  Yes                   database get   Gets database value 
  Yes                   database put   Adds/updates database value 
  Yes                           exec   Executes a given Application 
   No                       get data   Prompts for DTMF on a channel 
  Yes              get full variable   Evaluates a channel expression 
   No                     get option   Stream file, prompt for DTMF, with timeout. 
  Yes                   get variable   Gets a channel variable. 
   No                         hangup   Hangup a channel. 
  Yes                           noop   Does nothing. 
   No                   receive char   Receives one character from channels supporting it. 
   No                   receive text   Receives text from channels supporting it. 
   No                    record file   Records to a given file. 
   No                      say alpha   Says a given character string. 
   No                     say digits   Says a given digit string. 
   No                     say number   Says a given number. 
   No                   say phonetic   Says a given character string with phonetics. 
   No                       say date   Says a given date. 
   No                       say time   Says a given time. 
   No                   say datetime   Says a given time as specified by the format given. 
   No                     send image   Sends images to channels supporting it. 
   No                      send text   Sends text to channels supporting it. 
   No                 set autohangup   Autohangup channel in some time. 
   No                   set callerid   Sets callerid for the current channel. 
   No                    set context   Sets channel context. 
   No                  set extension   Changes channel extension. 
   No                      set music   Enable/Disable Music on hold generator 
   No                   set priority   Set channel dialplan priority. 
  Yes                   set variable   Sets a channel variable. 
   No                    stream file   Sends audio file on channel. 
   No            control stream file   Sends audio file on channel and allows the listener to control the stream. 
   No                       tdd mode   Toggles TDD mode (for the deaf). 
  Yes                        verbose   Logs a message to the asterisk verbose log. 
   No                 wait for digit   Waits for a digit to be pressed. 
   No                  speech create   Creates a speech object. 
   No                     speech set   Sets a speech engine setting. 
  Yes                 speech destroy   Destroys a speech object. 
   No            speech load grammar   Loads a grammar. 
  Yes          speech unload grammar   Unloads a grammar. 
   No        speech activate grammar   Activates a grammar. 
   No      speech deactivate grammar   Deactivates a grammar. 
   No               speech recognize   Recognizes speech. 
   No                          gosub   Cause the channel to execute the specified dialplan subroutine.

and this?

pbxitd*CLI> manager show commands 
  Action           Privilege        Synopsis                                               
  ------           ---------        --------                                               
  AbsoluteTimeout  system,call,all  Set absolute timeout.                                  
  AGI              agi,all          Add an AGI command to execute by Async AGI.            
  AOCMessage       aoc,all          Generate an Advice of Charge message on a channel.     
  Atxfer           call,all         Attended transfer.                                     
  Bridge           call,all         Bridge two channels already in the PBX.                
  Challenge        <none>           Generate Challenge for MD5 Auth.                       
  ChangeMonitor    call,all         Change monitoring filename of a channel.               
  Command          command,all      Execute Asterisk CLI Command.                          
  ConfbridgeKick   call,all         Kick a Confbridge user.                                
  ConfbridgeList   reporting,all    List participants in a conference.                     
  ConfbridgeListR  reporting,all    List active conferences.                               
  ConfbridgeLock   call,all         Lock a Confbridge conference.                          
  ConfbridgeMute   call,all         Mute a Confbridge user.                                
  ConfbridgeSetSi  call,all         Set a conference user as the single video source distri
  ConfbridgeStart  system,all       Start recording a Confbridge conference.               
  ConfbridgeStopR  call,all         Stop recording a Confbridge conference.                
  ConfbridgeUnloc  call,all         Unlock a Confbridge conference.                        
  ConfbridgeUnmut  call,all         Unmute a Confbridge user.                              
  CoreSettings     system,reportin  Show PBX core settings (version etc).                  
  CoreShowChannel  system,reportin  List currently active channels.                        
  CoreStatus       system,reportin  Show PBX core status variables.                        
  CreateConfig     config,all       Creates an empty file in the configuration directory.  
  DAHDIDialOffhoo  <none>           Dial over DAHDI channel while offhook.                 
  DAHDIDNDoff      <none>           Toggle DAHDI channel Do Not Disturb status OFF.        
  DAHDIDNDon       <none>           Toggle DAHDI channel Do Not Disturb status ON.         
  DAHDIHangup      <none>           Hangup DAHDI Channel.                                  
  DAHDIRestart     <none>           Fully Restart DAHDI channels (terminates calls).       
  DAHDIShowChanne  <none>           Show status of DAHDI channels.                         
  DAHDITransfer    <none>           Transfer DAHDI Channel.                                
  DataGet          <none>           Retrieve the data api tree.                            
  DBDel            system,all       Delete DB entry.                                       
  DBDelTree        system,all       Delete DB Tree.                                        
  DBGet            system,reportin  Get DB Entry.                                          
  DBPut            system,all       Put DB entry.                                          
  DigiumPhoneReco  message,all                                                             
  DigiumPhoneReco  message,all                                                             
  DPMALicenseStat  call,all                                                                
  DPMAMessageRegi  call,all                                                                
  DPMAMessageResp  call,all                                                                
  DPMAMessageSend  call,all                                                                
  Events           <none>           Control Event Flow.                                    
  ExtensionState   call,reporting,  Check Extension Status.                                
  Filter           system,all       Dynamically add filters for the current manager session
  GetConfig        system,config,a  Retrieve configuration.                                
  GetConfigJSON    system,config,a  Retrieve configuration (JSON format).                  
  Getvar           call,reporting,  Gets a channel variable or function value.             
  Hangup           system,call,all  Hangup channel.                                        
  IAXnetstats      system,reportin  Show IAX Netstats.                                     
  IAXpeerlist      system,reportin  List IAX Peers.                                        
  IAXpeers         system,reportin  List IAX peers.                                        
  IAXregistry      system,reportin  Show IAX registrations.                                
  ListCategories   config,all       List categories in configuration file.                 
  ListCommands     <none>           List available manager commands.                       
  LocalOptimizeAw  system,call,all  Optimize away a local channel when possible.           
  Login            <none>           Login Manager.                                         
  Logoff           <none>           Logoff Manager.                                        
  MailboxCount     call,reporting,  Check Mailbox Message Count.                           
  MailboxStatus    call,reporting,  Check mailbox.                                         
  MeetmeList       reporting,all    List participants in a conference.                     
  MeetmeListRooms  reporting,all    List active conferences.                               
  MeetmeMute       call,all         Mute a Meetme user.                                    
  MeetmeUnmute     call,all         Unmute a Meetme user.                                  
  MessageSend      message,all      Send an out of call message to an endpoint.            
  MixMonitor       system,all       Record a call and mix the audio during the recording.  
  MixMonitorMute   system,call,all  Mute / unMute a Mixmonitor recording.                  
  ModuleCheck      system,all       Check if module is loaded.                             
  ModuleLoad       system,all       Module management.                                     
  Monitor          call,all         Monitor a channel.                                     
  MuteAudio        system,all       Mute an audio stream.                                  
  Originate        originate,all    Originate a call.                                      
  Park             call,all         Park a channel.                                        
  ParkedCalls      <none>           List parked calls.                                     
  Parkinglots      <none>           Get a list of parking lots                             
  PauseMonitor     call,all         Pause monitoring of a channel.                         
  Ping             <none>           Keepalive command.                                     
  PlayDTMF         call,all         Play DTMF signal on a specific channel.                
  PresenceState    call,reporting,  Check Presence State                                   
  PRIShowSpans     <none>           Show status of PRI spans.                              
  QueueAdd         agent,all        Add interface to queue.                                
  QueueLog         agent,all        Adds custom entry in queue_log.                        
  QueueMemberRing  agent,all        Set the ringinuse value for a queue member.            
  QueuePause       agent,all        Makes a queue member temporarily unavailable.          
  QueuePenalty     agent,all        Set the penalty for a queue member.                    
  QueueReload      <none>           Reload a queue, queues, or any sub-section of a queue o
  QueueRemove      agent,all        Remove interface from queue.                           
  QueueReset       <none>           Reset queue statistics.                                
  QueueRule        <none>           Queue Rules.                                           
  Queues           <none>           Queues.                                                
  QueueStatus      <none>           Show queue status.                                     
  QueueSummary     <none>           Show queue summary.                                    
  Redirect         call,all         Redirect (transfer) a call.                            
  Reload           system,config,a  Send a reload event.                                   
  SendText         call,all         Send text message to channel.                          
  Setvar           call,all         Sets a channel variable or function value.             
  ShowDialPlan     config,reportin  Show dialplan contexts and extensions                  
  SIPnotify        system,all       Send a SIP notify.                                     
  SIPpeers         system,reportin  List SIP peers (text format).                          
  SIPpeerstatus    system,all       Show the status of one or all of the sip peers.        
  SIPqualifypeer   system,reportin  Qualify SIP peers.                                     
  SIPshowpeer      system,reportin  show SIP peer (text format).                           
  SIPshowregistry  system,reportin  Show SIP registrations (text format).                  
  Status           system,call,rep  List channel status.                                   
  StopMixMonitor   system,call,all  Stop recording a call through MixMonitor, and free the 
  StopMonitor      call,all         Stop monitoring a channel.                             
  UnpauseMonitor   call,all         Unpause monitoring of a channel.                       
  UpdateConfig     config,all       Update basic configuration.                            
  UserEvent        user,all         Send an arbitrary event.                               
  VoicemailUsersL  call,reporting,  List All Voicemail User Information.                   
  WaitEvent        <none>           Wait for an event to occur.                            
  WATSendSms       <none>           Send a SMS using libWAT on a given span                
  WATShowSpan      <none>           Show status of WAT spans.                              
  WATShowSpans     <none>           Show status of WAT spans. 

Thank you,

Daniel Friedman
Trixton LTD

Brought home :slight_smile:

Action: Monitor
ActionID:
Channel:
File:
Format:
Mix:

Interesting MIX combining channels …

Thanks’re nice as ever!

Now the point is how I draw the file …

In the database tables CDR CEL I see nothing …

How can it be done?

Hi,

Usually, the recording file is stored in /var/spool/asterisk/monitor
did you checked there?

Daniel Friedman
Trixton LTD.

Yes sure

The fact that I made a software to manage everything and I would not have to build the need to tie call history with the successful registration …

But seeing the database I do not see registration data

Hi,

It is suppose to be in the cdr record. If you do not see it make sure to issue a cdr with the recording file’s name.
Here is a little dialplan that I have wrote that you can test (for Freepbx only):

exten => 2345,1,Answer()
same => n,Set(__REC_POLICY_MODE=always)
same => n,Gosub(sub-record-check,s,1(out,${EXTEN},))
same => n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
same => n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
same => n,MixMonitor(${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}.${MIXMON_FORMAT},a,${MIXMON_POST})
same => n,Set(LOG_FILE=/var/log/asterisk/dialler_log.full)
same => n,Set(LOG_REC_FILE=${CALLFILENAME}.${MIXMON_FORMAT})
same => n,Set(LOG_TEMP_REC_LINE=${LOG_REC_FILE})
same => n,TrySystem(echo "${LOG_TEMP_REC_LINE}" \>\> ${LOG_FILE})
same => n,NoOp(Status of TrySystem is: ${SYSTEMSTATUS})
same => n,Echo

Check the log file in /var/log/asterisk/dialler_log.full after the call to verify that the file has been created.

If you wish to develop your own CDR’s database take a look at this link.
You will have to adjust your ODBC if it is not setup.

Thank you,

Daniel Friedman
Trixton LTD.

All interesting and useful
Among the possibilities I am considering to save the file with a name given to me …
Use clean then an appropriate table, the file name may be "uniqueid"
Then it goes the next sequence should be reliable traceability of records
When I give notice apporofondito
Thank you