[Freeswitch-users] trouble making conditions for OR

Trever L. Adams trever.adams at gmail.com
Fri Oct 28 06:14:05 MSD 2011


On 10/27/2011 04:07 PM, Michael Collins wrote:
> Trever,
>
> You're in one of those gray areas where xml_curl may actually be
> easier in the long run unless you have just this one single set of
> goofy conditions to handle. However, if I understand your question
> correctly you should be able to do this in the dialplan.
>
> I can't be exactly certain why your call is failing since the debug
> log snippet you gave was a bit small, however my guess is that you
> don't actually have any actions inside of a matching <condition> for
> the call that was made. It looks like it was a "private" caller so
> this line would no doubt match:
>
> <condition field="caller_id_name" expression=".*rivate.*"
> break="on-true"/>
>
> When that condition matches, the dialplan processing will stop
> checking for any more conditions inside of the extension named
> "screen" and simply move on in the dialplan. (That behavior is caused
> by the break="on-true" directive.) So, do you have any other
> extensions in this context? Whether you do or not, it seems like none
> of your conditions that actually have actions inside them is being
> matched, therefore you have no actions for this call and get the no
> route error.
>
> My recommendation is to pastebin the entire Incoming-FXO context as
> well as debug level output for the incoming call. Paste the call log
> from start to finish. That will help us see what's really going on.
>
> -MC
>
MC,

Thank you, I will have to look into xml_curl. Apparently I misunderstood
the documentation. If ANY of these things match, the actions to screen
the call should be taken. Am I messing this up?

At the moment I have no other processing of incoming calls. Still
working on things.

> On Thu, Oct 27, 2011 at 1:44 PM, Trever L. Adams
> <trever.adams at gmail.com <mailto:trever.adams at gmail.com>> wrote:
>
>     The dialplan:
>
>     <include>
>        <context name="Incoming-FXO">
>            <extension name="screen">
>                <condition field="caller_id_number" expression="^$"
>     break="on-true"/>
>                <condition field="caller_id_number"
>     expression=".nonymous.*"
>     break="on-true"/>
>                <condition field="caller_id_number" expression=".nknown.*"
>     break="on-true"/>
>                <condition field="caller_id_number" expression=".*rivate.*"
>     break="on-true"/>
>                <condition field="caller_id_number"
>     expression=".estricted.*" break="on-true"/>
>                <condition field="caller_id_number" expression="PTSN.*"
>     break="on-true"/>
>                <condition field="caller_id_number" expression=".oll.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=".nonymous.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=".nknown.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=".*rivate.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=".estricted.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression="PTSN.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=".oll.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=".--.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression=",.*"
>     break="on-true"/>
>                <condition field="caller_id_name" expression="000.*">
>                    <action application="set"
>     data="call_screen_filename=/tmp/${caller_id_number}-name.wav"/>
>                    <action application="answer"/>
>                    <action application="sleep" data="1000"/>
>                    <action application="phrase"
>     data="voicemail_record_name"/>
>                    <action application="playback"
>     data="tone_stream://%(500, 0, 640)"/>
>                    <action application="set"
>     data="playback_terminators=#*0123456789"/>
>                    <action application="record"
>     data="${call_screen_filename} 7 200 2"/>
>                    <action application="set" data="group_confirm_key=1"/>
>                    <action application="set"
>     data="fail_on_single_reject=true"/>
>                    <action application="set"
>     data="group_confirm_file=phrase:screen_confirm:${call_screen_filename}"/>
>                    <action application="set"
>     data="continue_on_fail=true"/>
>     <!--                <action application="bridge" data="user/$1"/> -->
>                    <action application="voicemail" data="default
>     $${domain}
>     $1"/>
>                    <action application="hangup"/>
>                </condition>
>            </extension>
>        </context>
>     </include>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111027/2e9b1666/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111027/2e9b1666/attachment-0001.bin 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list