Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-11316

Add dialplan APP and API execution to mod_rayo

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.2
    • Component/s: mod_rayo
    • Labels:
      None
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • Userland:
      GNU/Linux
    • Distribution:
      Debian
    • Distribution Version:
      Debian 8 jessie
    • Compiler:
      gcc
    • FreeSWITCH GIT Revision:
      latest
    • GIT Master Revision hash::
      latest

      Description

      Adding two new commands to mod_rayo.

      1. API execution (as in mod_commands):

      This is a server command to execute a FS API. This is executed in a background thread.

      1.1 Example:
      <iq to='192.168.1.27' type='set' id='console-3' from='aabac3a4-8c72-4439-aac5-1b36e5a675e7@192.168.1.27/console'><exec xmlns='urn:xmpp:rayo:1' api='sofia' args='status'/></iq>

      <iq from='192.168.1.27' to='aabac3a4-8c72-4439-aac5-1b36e5a675e7@192.168.1.27/console' type='result' id='console-3'><response response=' Name Type Data State
      =================================================================================================
                       external profile sip:mod_sofia@192.168.1.27:5060 RUNNING (0)
      =================================================================================================
      1 profile 0 aliases
      '/></iq>

      1.2 test alias for rayo.conf.xml:
        <alias name="exec" target="server" args="2"><![CDATA[<exec xmlns="urn:xmpp:rayo:1" api="$1" args="$2"/>]]></alias>




      2. Dialplan APP execution (as in mod_dptools):

      This is a call command. The APP is executed as a rayo component.

      2.1 Example:
      <iq to='f450a983-ba40-4008-abe5-1b8bed2c2c2b@192.168.1.27' type='set' id='console-6' from='aabac3a4-8c72-4439-aac5-1b36e5a675e7@192.168.1.27/console'><app xmlns='urn:xmpp:rayo:exec:1' app='playback' args='ivr/8000/ivr-you_have_dialed_an_invalid_extension.wav'/></iq>

      <iq from='f450a983-ba40-4008-abe5-1b8bed2c2c2b@192.168.1.27' to='aabac3a4-8c72-4439-aac5-1b36e5a675e7@192.168.1.27/console' type='result' id='console-6'><ref xmlns='urn:xmpp:rayo:1' uri='xmpp:f450a983-ba40-4008-abe5-1b8bed2c2c2b@192.168.1.27/exec-1'/></iq>

      <presence from='f450a983-ba40-4008-abe5-1b8bed2c2c2b@192.168.1.27/exec-1' to='aabac3a4-8c72-4439-aac5-1b36e5a675e7@192.168.1.27/console' type='unavailable'><complete xmlns='urn:xmpp:rayo:ext:1'><done xmlns='urn:xmpp:rayo:ext:complete:1'/><app xmlns='urn:xmpp:rayo:exec:complete:1' response='FILE PLAYED'/></complete><delay xmlns='urn:xmpp:delay' stamp='2018-08-07T02:04:24Z'/></presence>

      2.2 test alias for rayo.conf.xml
         <alias name="app" target="call" args="2"><![CDATA[<app xmlns="urn:xmpp:rayo:exec:1" app="$1" args="$2"/>]]></alias>

        Attachments

          Activity

            People

            • Assignee:
              crienzo Christopher Rienzo
              Reporter:
              crienzo Christopher Rienzo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: