Dialplan action based on callerid number?

mdoupe

New Member
Mar 21, 2023
27
0
1
44
Hi all,

Hopefully an easy question. :)

I am trying to make an operator dialplan that sends to different operators based on the extension that is dialing 0. I've made a simple test dialplan to send two extensions to each other when they dial 0. the first one (3333 > 3334) works, but the second does not try to match. I assume it is because I'm not quite understanding how dialplan flow works. :)

Code:
    <extension name="operator-new" continue="false" uuid="53fa7641-b806-4a8d-bede-a5d8e0c7f05f">
        <condition field="destination_number" expression="^0$"/>
        <condition field="caller_id_number" expression="^3333$">
            <action application="transfer" data="3334 XML fusionpbx.example.com"/>
        </condition>
        <condition field="caller_id_number" expression="^3334$">
            <action application="transfer" data="3333 XML fusionpbx.example.com"/>
        </condition>
    </extension>

Any help would be appreciated!
 
I think I've figured it out. I added "break="on-true"" to all of the caller_id_number conditions so if one is false it doesn't stop processing the rule.