Ticket #3696: app_mixmonitor.patch

File app_mixmonitor.patch, 1.3 kB (added by Nick_Lewis, 3 years ago)
  • old/app_mixmonitor.c

    old new  
    7373"The variable MIXMONITOR_FILENAME will contain the filename used to record.\n" 
    7474""; 
    7575 
     76static const char *stop_app = "StopMixMonitor"; 
     77static const char *stop_synopsis = "Stop recording a call through MixMonitor"; 
     78static const char *stop_desc = "" 
     79"  StopMixMonitor():\n" 
     80"Stops the audio recording that was started with a call to MixMonitor()\n" 
     81"on the current channel.\n" 
     82""; 
     83 
    7684STANDARD_LOCAL_USER; 
    7785 
    7886LOCAL_USER_DECL; 
     
    381389  return 0; 
    382390} 
    383391 
     392static int stop_mixmonitor_exec(struct ast_channel *chan, void *data) 
     393{ 
     394    ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type); 
     395        return 0; 
     396} 
     397 
    384398static int mixmonitor_cli(int fd, int argc, char **argv)  
    385399{ 
    386400  struct ast_channel *chan; 
     
    418432 
    419433  res = ast_cli_unregister(&cli_mixmonitor); 
    420434  res |= ast_unregister_application(app); 
    421    
     435  res |= ast_unregister_application(stop_app); 
    422436  STANDARD_HANGUP_LOCALUSERS; 
    423437 
    424438  return res; 
     
    430444 
    431445  res = ast_cli_register(&cli_mixmonitor); 
    432446  res |= ast_register_application(app, mixmonitor_exec, synopsis, desc); 
     447  res |= ast_register_application(stop_app, stop_mixmonitor_exec, stop_synopsis, stop_desc); 
    433448 
    434449  return res; 
    435450}