I would like to check if the called number contains a country code, if not then one should be added.
I've got a variable in my user's XML file called country_code containing +44.

This is my code so far, however, I think the last to conditions overlap:

    <condition field="destination_number" expression="^(\+\d{3,20})$">

      <action application="export" data="dialed_extension=$1"/>

    </condition>

    <condition field="destination_number" expression="^00(\d{3,20})$">

      <action application="export" data="dialed_extension=+$1"/>

    </condition>

    <condition field="destination_number" expression="^(\d{3,20})$">

      <action application="export" data="dialed_extension=${country_code}$1"/>

    </condition>


I would like to change 00 to +, and if no + is on the number then use country_code from the user. If it does contain a +, then just use the dialled number.