advanced_dialplans.rst 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ####################
  2. Advanced Dialplans
  3. ####################
  4. FusionPBX installs several default dialplans. FusionPBX also gives the option to make new dialplans. This gives you the power for more advanced functions, and produce the desired result.
  5. Adding a Dialplan
  6. ^^^^^^^^^^^^^^^^^^^
  7. You can create a new dialplan or copy and modify an existing dialplan.
  8. * Go to Dialplan > Dialplan Manager
  9. * Click the **ADD** button at the top right.
  10. .. image:: ../_static/images/dialplan/fusionpbx_dialplan_advanced1.png
  11. :scale: 60%
  12. * Complete required fields and click save.
  13. .. image:: ../_static/images/dialplan/fusionpbx_dialplan_advanced2.png
  14. :scale: 60%
  15. Edit a Dialplan
  16. ^^^^^^^^^^^^^^^^^
  17. Find the dialplan you want to edit and click the edit icon.
  18. .. image:: ../_static/images/dialplan/fusionpbx_dialplan_advanced3.png
  19. :scale: 60%
  20. Once you enter data into the empty fields at the bottom and click save, more blank fileds will populate if needed.
  21. .. image:: ../_static/images/dialplan/fusionpbx_dialplan_advanced4.png
  22. :scale: 60%
  23. Enable a Dialplan Destination
  24. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  25. Dialplans that have a value in the **Number** filed can be enabled and used in `Dialplan > Destinations <../dialplan/destinations.html>`_. Setting the **destination** field to **True** will enable the dialplan to be visable and used as an action in `Dialplan > Destinations <../dialplan/destinations.html>`_.
  26. .. image:: ../_static/images/dialplan/fusionpbx_dialplan_advanced5.png
  27. :scale: 60%
  28. Cross Tenant Calling
  29. ~~~~~~~~~~~~~~~~~~~~~~
  30. This would require a prefix of 5 followed by 4 digit extensions. The prefix can be any number that you choose to use and the 4 digit extension must match the destination tenant. So if the destination extensions are 3 digit then you would use 3 instead of 4.
  31. +-----------+---------------------------+------------------------------------------+-------+--------+-------+-------+
  32. | Tag | Type | Data | Break | Inline | Group | Order |
  33. +===========+===========================+==========================================+=======+========+=======+=======+
  34. | condition | ${destination_number} | ^5(\d{4})$ | | | | 5 |
  35. +-----------+---------------------------+------------------------------------------+-------+--------+-------+-------+
  36. | action | set | domain_name=customer.domain.tld | | True | | 10 |
  37. +-----------+---------------------------+------------------------------------------+-------+--------+-------+-------+
  38. | action | set | domain_uuid=correct-uuid-for-the-domain | | True | | 15 |
  39. +-----------+---------------------------+------------------------------------------+-------+--------+-------+-------+
  40. | action | transfer | $1 XML ${domain_name} | | | | 20 |
  41. +-----------+---------------------------+------------------------------------------+-------+--------+-------+-------+
  42. * Be sure to set the **Continue dropdown box True**
  43. * Finally we have the desired dialplan to call from tenant A to tenant B.
  44. .. image:: ../_static/images/dialplan/fusionpbx_custom_dialplan.png
  45. :scale: 60%
  46. .. note::
  47. A quick way to find a domains uuid is by going to Advanced > Domains. Then click the edit icon on the domain you want to know the uuid of. The uuid will be at the end of the url.