File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1239,7 +1239,7 @@ class Endpoint extends Emitter {
12391239 /**
12401240 * Pause sending audio over the websocket connection
12411241 * @param {string } [bugname] - bugname to pause
1242- * @param {boolean } [silence] - whether to send silence frames while paused
1242+ * @param {boolean } [silence] - whether to send silence frames while paused, only applied if bugname is specified
12431243 * @param {function } [callback] - callback invoked when api request completes
12441244 * @return {Promise|Endpoint } returns a Promise if no callback supplied; otherwise
12451245 * a reference to the Endpoint object
@@ -1276,9 +1276,10 @@ class Endpoint extends Emitter {
12761276 //forkAudioPause('my-bugname', true)
12771277 }
12781278 //forkAudioPause('my-bugname', true, callback)
1279- //2nd argument is silence, 3rd is bugname
1280- args . push ( silence ? 'silence' : 'blank' ) ;
1281- if ( bugname ) args . push ( bugname ) ;
1279+ if ( bugname ) {
1280+ args . push ( bugname ) ;
1281+ args . push ( silence ? 'silence' : 'blank' ) ;
1282+ }
12821283
12831284 const __x = ( callback ) => {
12841285 debug ( `calling uuid_audio_fork with args ${ JSON . stringify ( args ) } ` ) ;
Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ test.skip('fork audio', (t) => {
521521 return uac . playFile ( 'voicemail/16000/vm-record_message.wav' ) ;
522522 } )
523523 . then ( ( evt ) => {
524- return ep . forkAudioPause ( true ) ;
524+ return ep . forkAudioPause ( 'background_record' , true ) ;
525525 } )
526526 . then ( ( evt ) => {
527527 return ep . forkAudioResume ( ) ;
You can’t perform that action at this time.
0 commit comments