Sending DTMF

loopingrage edited this page Dec 1, 2011 · 1 revision

The DTMF command lets Rayo applications to send DTMF tones to a given call. The syntax is really simple:

  <!-- Send a couple of DTMF tones to a call -->
 <iq id='1234' type='set' to='9f00061@call.rayo.net/1' from='16577@app.rayo.net/1'>
    <dtmf xmlns='urn:xmpp:rayo:1' tones='1' />
  </iq>

After running the command above, the DTMF tones will be sent to the call and the instructing call will get an ACK back. The call that was target for the DTMF tones will also receive a DTMF Event.

<!-- ACK for the DTMF command -->
<iq id='1234' type='result' to='16577@app.rayo.net/1' from='9f00061@call.rayo.net/1'>

<!-- DTMF event -->
<presence id='1235' to='16577@app.rayo.net/1' from='9f00061@call.rayo.net/1'>
  <dtmf xmlns="urn:xmpp:rayo:1" signal="1"/>
</presence>

Optionally you can also sends multiple tones on the same command:

  <!-- Send a couple of DTMF tones to a call -->
 <iq id='1234' type='set' to='9f00061@call.rayo.net/1' from='16577@app.rayo.net/1'>
    <dtmf xmlns='urn:xmpp:rayo:1' tones='12' />
  </iq>