[Freeswitch-dev] How to save RTP-audiostrem to a file?

Евгений Золотов zolotov at altron.ua
Mon Sep 1 13:06:05 EDT 2008


We had a question:

> With which application and API is possible to keep full content of RTP audiostream to a file?
> Our FreeSWITCH is configured in such manner that RTP-traffic directing throw FreeSWITCH,
> but not between UAs.

And took answer on it:

> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session

-------------------------------------------------------------------

On it HELP we have mase such extension :

<extension name="ext-record">
  <condition field="destination_number" expression="^4010$">
    <action application="set" data="RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/>
    <action application="set" data="RECORD_COPYRIGHT=(c) 2008, Altron Inc." />
    <action application="set" data="RECORD_SOFTWARE=FreeSwitch" />
    <action application="set" data="RECORD_ARTIST=Registration" />
    <action application="set" data="RECORD_COMMENT=!!!" />
    <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/>
    <action application="set" data="RECORD_STEREO=true"/>
    <action application="record_session" data="$${base_dir}/recordings/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>
    <action application="set" data="ringback=${us-ring}"/>
    <action application="bridge" data="sofia/nat/${dialed_ext}@localhost:5062" />
    <action application="answer" />
  </condition>
</extension>

This draft works already, but there are new questions:

1. It's seems, that record of RTP session can occur only when RTP stream is routed through FS: UA-> FS-> UA, instead of directly (in LAN) UA-> UA.

For this purpose, as we understand, it is necessary to set values in variables of FreeSWITCH:

<action application="set" data="bypass_media=..."/>
<action application="set" data="proxy_media=..."/>
<action application="set" data="inbound_late_negotiation=..."/> ( for SIP profile nat for extension ext-record).

What values need to be set in variables that all RTP traffic passed through FreeSWITCH?


2. At extension ext-record we set record_session then we do bridge to leg B. As it is possible to configurate registration from another extension, for example:

<extension name="XXXX">
  <condition field="destination_number" expression="^XXXX$">
     ...
     <action application="execute_extension" data="ext-record XML public "/>  
     ...
     <action application="bridge" data="sofia/nat/YYYY" />
     ...
  </condition>
</extension>

- where own extension not call any leg B, but only record session XXXX->YYYY.
How we are able to do this???

Thankful in advance, Evgeniy.
                                                                                      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080901/6f67956b/attachment.html 


More information about the Freeswitch-dev mailing list