[Freeswitch-dev] Recording Calls to Extensions

Michael S Collins msc at freeswitch.org
Tue Jul 28 07:34:37 PDT 2009



On Jul 28, 2009, at 4:44 AM, Ian Quek <ianquek at gmail.com> wrote:

> Hi,
>
> I have a question regarding editing the default.xml file in conf/ 
> dialplan.
> What I want to do, is set the dialplan to record calls on specific  
> extensions, for example, 1002, but not on other extensions.
>
> So far, I've tried the following:
>
>
> <extension name="Local_Extension">
>      <condition field="destination_number" expression="^(1002)$">

Try adding: break="never" after the expression in the above line.  
Remember, the default matching logic is "break on first non match"  
which in your case would clobber all those local extensions except  
1002.  Adding the break="never" will let the extension keep matching  
even if 1002 doesn't match.
-MC
>
>            <action application="set" data="RECORD_TITLE=...
>                         :
>                         :
>            <action application="record_session" data="$${base_dir}/ 
> recordings/archive/${strftime(%Y-%m-%d-%H-%M-%S)}_$ 
> {destination_number}_${caller_id_number}.wav"/>
>       </condition>
>       <condition field="destination_number" expression="^(10[01] 
> [0-9])$">
>                         :
>                         :
>             the rest of the applications that were originally in  
> Local_Extension are here
>                         :
>                         :
>       </condition>
> </extension>
>
> The problem with this, is that now all other calls that do not dial  
> 1002 give me the error message that the "destination number is not  
> available"
>
> I have also tried reversing the order:
>
> <extension name="Local_Extension">
>       <condition field="destination_number" expression="^(10[01] 
> [0-9])$">
>                         :
>                         :
>             the rest of the applications that were originally in  
> Local_Extension are here
>                         :
>                         :
>       </condition>
>       <condition field="destination_number" expression="^(1002)$">
>            <action application="set" data="RECORD_TITLE=...
>                         :
>                         :
>            <action application="record_session" data="$${base_dir}/ 
> recordings/archive/${strftime(%Y-%m-%d-%H-%M-%S)}_$ 
> {destination_number}_${caller_id_number}.wav"/>
>       </condition>
> </extension>
>
> However, this results in no recording being done at all.
>
> How do I fix this such that I only record calls to extension 1002,  
> and allow all other calls through normally?
>
> thanks
> -Ian
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org



More information about the FreeSWITCH-dev mailing list