[Freeswitch-users] Svar: Re: Home setup with home company

Michael Collins msc at freeswitch.org
Thu Jan 21 00:25:32 PST 2010


On Wed, Jan 20, 2010 at 2:45 AM, mailinglist <mailinglist at fribert.dk> wrote:

> Hi Michael
>
> It's running on pfsense, so it's kinda locked to the version it currently
> is.
> Looks very nice though.
> Looking beyond that, is the action / anti-action list corrent?
>

I would say that you need to add an anti-action under the day of week check
and go to vm if it does not match. Right now if the DOW is 0 or 6 then the
entire extension will "fail" and the dialplan will just move on. Remember
that if any conditions fail then the entire thing extension "fails" unless
you are doing interesting things with the break= parameter. See the dialplan
page on the wiki for examples of how to use break in your conditions.
-MC


> Best regards
> Fribse
>
>
> >>> Michael Collins 20-01-10 1:53 >>>
>
>
> On Tue, Jan 19, 2010 at 9:02 AM, mailinglist <mailinglist at fribert.dk>wrote:
>
>>  I have a very small one man constultancy company that has the occasional
>> call, unfortunately we are getting more spam calls after hours than real
>> calls during work hours, so I would like to set up a TOD system.
>>
>> First step for me is just playing with the TOD example, I've gotten this
>> far:
>>
>> <extension name="CompanyTOD" continue="true">
>>    <condition field="destination_number" expression="^(8203)$"/>
>>       <!-- man strftime - M-F, 9AM to 5PM -->
>>       <condition field="${strftime(%w)}" expression="^([1-5])$"/>
>>       <condition field="${strftime(%H%M)}"
>> expression="^((09|1[0-6])[0-5][0-9]|1700)$">
>>          <action application="set" data="call_timeout=45"/>
>>          <action application="set" data="domain_name=10.11.12.25"/>
>>          <action application="set" data="continue_on_fail=true"/>
>>          <action application="set" data="hangup_after_bridge=true"/>
>>          <action application="bridge" data="
>> group/company@${domain_name}"/ <group/company@$%7Bdomain_name%7D%22/>>
>>          <action application="answer" data=""/>
>>          <action application="sleep" data="1000"/>
>>          <action application="voicemail" data="default 10.11.12.25
>> 10199"/>
>>          <anti-action application="voicemail" data="default 10.11.12.25
>> 10199"/>
>>       </condition>
>> </extension>
>> My idea with this, was that in the time 9-17 mon-fri, it rings, the rest
>> of the time it's sent directly to the voicemail.
>> I would of course like to have it not take messages outside work hours,
>> but that's just refining :-)
>>
>> But it picks up the call, and then nothing...
>>
>>
> We have a much cleaner way of doing TOD and DOW handling. You'll need to
> get to the latest FreeSWITCH version. Look in conf/dialplan/default.xml for
> this example:
>
>     <!-- Example of doing things based on time of day.
>
>      year = 4 digit year. Example year="2009"
>      yday = 1-365
>      mon = 1-12
>      mday = 1-31
>      week = 1-52
>      mweek= 1-6
>      wday = 1-7
>      hour = 0-23
>      minute = 0-59
>      minute-of-day = 1-1440
>
>      Example:
>      <condition minute-of-day="540-1080"> (9am to 6pm EVERY day)
>      do something ...
>      </condition>
>     -->
>     <extension name="tod_example" continue="true">
>       <condition wday="2-6" hour="9-18">
>         <action application="set" data="open=true"/>
>       </condition>
>     </extension>
>
>
> Use that condition instead of the two conditions you're now using and see
> if you have better success.
>
> -MC
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100121/c183527c/attachment-0002.html 


More information about the FreeSWITCH-users mailing list