[Freeswitch-users] Recording skipping silence on outbound call recording

Andrew Keil andrew.keil at visytel.com
Wed Jun 20 03:20:39 UTC 2018


To FreeSWITCH Users,

I managed to find and fix the issue and thought I would provide my solution here since it may help someone else.

Prior to the recording I set the following inside my outbound Lua script:

session:setVariable("record_fill_cng","1400")

Note: 1400 matches the waste_resources default setting inside the switch_ivr_record_file (switch_ivr_play_say.c)

This fixed the issue and now my recording contains the silence periods correctly (which is what I was after).  I also noticed that since the Lua destination script that my outbound was calling contains periods of session:sleep(...), when waiting for DTMF, and it was this period that was not being recorded.  Now with this fix everything is fine and those periods of session:sleep(...) are matched inside my outbound recorded audio file.

Andrew

--- My original e-mail to FreeSWITCH Users ---

To FreeSWITCH Users,

I am attempting to make a recording of an outbound call using the originate API call which starts a Lua script which then simply records to disk exactly what it hears.

I just noticed an interesting issue (or feature) where the recording skips any silence.  What I am aiming for is for no silence to be skipped inside the recording, if someone can provide some settings for me to try I would be more than happy to experiment further.

The settings for the Lua session:recordFile are length of recording: 60 seconds; silence threshold: 300; silence seconds: 60 seconds  {essentially termination on silence is disabled since the silence seconds = recording seconds}

I also tried with silence threshold = 0 and silence is still skipped inside the recording.

I also tried the setting inside the appropriate profile: <param name="suppress-cng" value="true"/> and this made no difference, silence is still skipped inside the recording.

My setup is one single FreeSWITCH 1.6.20 (production version) box with a simple internal gateway setup to land on the same FreeSWITCH IVR (just for testing).

API command: originate {origination_uuid=121e20a6-1245-439a-8527-53efab009334-out-1,origination_caller_id_number=FLOODOUT,call_timeout=15,ignore_early_media=true,return_ring_ready=true,suppress_cng=true}sofia/gateway/visytel-pc-ivr/01111111111 FLOODOUT

The SDP inside my log is similar to this for the outbound and inbound (Note: The outbound call is performing the recording):

121e20a6-1245-439a-8527-53efab009334-out-1 Local SDP:
121e20a6-1245-439a-8527-53efab009334-out-1 v=0
121e20a6-1245-439a-8527-53efab009334-out-1 o=FreeSWITCH 1529274701 1529274702 IN IP4 192.168.15.15
121e20a6-1245-439a-8527-53efab009334-out-1 s=FreeSWITCH
121e20a6-1245-439a-8527-53efab009334-out-1 c=IN IP4 192.168.15.15
121e20a6-1245-439a-8527-53efab009334-out-1 t=0 0
121e20a6-1245-439a-8527-53efab009334-out-1 m=audio 25994 RTP/AVP 9 8 0 101
121e20a6-1245-439a-8527-53efab009334-out-1 a=rtpmap:9 G722/8000
121e20a6-1245-439a-8527-53efab009334-out-1 a=rtpmap:8 PCMA/8000
121e20a6-1245-439a-8527-53efab009334-out-1 a=rtpmap:0 PCMU/8000
121e20a6-1245-439a-8527-53efab009334-out-1 a=rtpmap:101 telephone-event/8000
121e20a6-1245-439a-8527-53efab009334-out-1 a=fmtp:101 0-16
121e20a6-1245-439a-8527-53efab009334-out-1 a=silenceSupp:off - - - -
121e20a6-1245-439a-8527-53efab009334-out-1 a=ptime:20
121e20a6-1245-439a-8527-53efab009334-out-1 a=sendrecv

6da97c7c-1052-4f78-8dde-83901147a0c1 2018-06-18 15:44:55.596296 [DEBUG] sofia.c:7094 Remote SDP:
6da97c7c-1052-4f78-8dde-83901147a0c1 v=0
6da97c7c-1052-4f78-8dde-83901147a0c1 o=FreeSWITCH 1529274701 1529274702 IN IP4 192.168.15.15
6da97c7c-1052-4f78-8dde-83901147a0c1 s=FreeSWITCH
6da97c7c-1052-4f78-8dde-83901147a0c1 c=IN IP4 192.168.15.15
6da97c7c-1052-4f78-8dde-83901147a0c1 t=0 0
6da97c7c-1052-4f78-8dde-83901147a0c1 m=audio 25994 RTP/AVP 9 8 0 101
6da97c7c-1052-4f78-8dde-83901147a0c1 a=rtpmap:9 G722/8000
6da97c7c-1052-4f78-8dde-83901147a0c1 a=rtpmap:8 PCMA/8000
6da97c7c-1052-4f78-8dde-83901147a0c1 a=rtpmap:0 PCMU/8000
6da97c7c-1052-4f78-8dde-83901147a0c1 a=rtpmap:101 telephone-event/8000
6da97c7c-1052-4f78-8dde-83901147a0c1 a=fmtp:101 0-16
6da97c7c-1052-4f78-8dde-83901147a0c1 a=silenceSupp:off - - - -
6da97c7c-1052-4f78-8dde-83901147a0c1 a=ptime:20
6da97c7c-1052-4f78-8dde-83901147a0c1

Kind Regards,

Andrew Keil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180620/487d44d7/attachment.html>


More information about the FreeSWITCH-users mailing list