res/res_monitor: Reset in/out sample counts on Monitor start
[asterisk/asterisk.git] / res / res_monitor.c
index 7f1fa41..872f565 100644 (file)
@@ -402,6 +402,8 @@ int AST_OPTIONAL_API_NAME(ast_monitor_start)(struct ast_channel *chan, const cha
                } else
                        monitor->write_stream = NULL;
 
+               ast_channel_insmpl_set(chan, 0);
+               ast_channel_outsmpl_set(chan, 0);
                ast_channel_monitor_set(chan, monitor);
                ast_monitor_set_state(chan, AST_MONITOR_RUNNING);
                /* so we know this call has been monitored in case we need to bill for it or something */