[Freeswitch-users] trouble making conditions for OR

Trever L. Adams trever.adams at gmail.com
Fri Oct 28 00:44:49 MSD 2011


Hello everyone,

The last few days I am beginning to explore freeswitch. I am having a
bit of trouble. I am trying to user the examples near
http://wiki.freeswitch.org/wiki/Dialplan_XML#Complex_Condition.2FAction_Rules
in the documentation. If I use '\' as it says, I get an error about
</extension> being unexpected. If I use '/' it doesn't work. Below is my
dialplan. It should trigger on empty number as well as the strings
mentioned. I am pretty sure the regex is accurate. However, instead of
running, I get:


2011-10-27 14:38:16.269266 [INFO] mod_dialplan_xml.c:336 Processing
private <private>-> in context Incoming-FXO
2011-10-27 14:38:16.269266 [INFO] switch_core_state_machine.c:177 No
Route, Aborting

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>

Any help would be greatly appreciated.

Thank you,
Trever
-- 
"I know who I am. No one else knows who I am. If I was a giraffe, and
someone said I was a snake, I'd think, no, actually I'm a giraffe." --
Richard Gere


-------------- 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/5051fd6d/attachment.bin 


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