Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
wiki:4.-cliente:4.6.-modulos:d.-llamadas-voip:start [2017/11/09 10:53]
patricia [HangVoIPCall]
wiki:4.-cliente:4.6.-modulos:d.-llamadas-voip:start [2017/11/09 10:57] (actual)
patricia [SendDTMF]
Línea 1: Línea 1:
 +===== Llamadas voice over IP =====
 +\\
  
 +<WRAP center round important 70%>
 +  * Esta función sólo está disponible en el framework Android.
 +  * La versión del sistema operativo debe ser Android 2.3.X (Gingerbread) o superior.
 +  * A la hora de desarrollar, es conveniente estar atento a los mensajes del logcat que vienen bajo el tag "<nowiki>xonevoip</nowiki>" y "<nowiki>sipmanager</nowiki>", para solucionar errores.
 +</WRAP>
 +
 +==== Implementación ====
 +\\
 +Para empezar, descargamos e instalamos el módulo de llamadas <nowiki>xonevoip</nowiki> desde <nowiki>xonesupport</nowiki>.
 +\\
 +Como las llamadas telefónicas son algo que se puede recibir en cualquier momento, usamos un objeto global como pueden ser las variables user(""). Para ello, usamos <nowiki>createobject</nowiki>("<nowiki>xonevoip</nowiki>") y se lo asignamos a algo como MAP_VOIP.
 +\\
 +Si las funciones <nowiki>voip</nowiki> no están soportadas en este terminal, al crear el objeto saltará una excepción y mostrará un mensaje de aviso por pantalla.
 +\\
 +Necesitamos también definir en el nodo <app> de la aplicación el atributo phone-coll="<nowiki>coleccionllamadaentrante</nowiki>", que se llamará automáticamente cuando se reciba una llamada desde ese perfil y que debe contener, como mínimo, los botones de colgar y descolgar la llamada. La idea bajo esta implementación, es que el desarrollador cree los botones para hacer llamadas, recibirlas o registrarse con el servidor, y que diseñe una pantalla de llamadas a su gusto.
 +\\
 +Por ejemplo, se puede hacer que se registre al loguearse en la aplicación con los datos que se saquen de la base de datos y que haya una opción en algún menú para hacer las llamadas.
 +\\
 +Para las pruebas, se puede montar un servidor [[http://www.asterisk.org/ | Asterisk®]] o usar algún proveedor gratuito como [[http://www.iptel.org/service | IPTel.]]
 +\\
 +A continuación se describen las funciones y más abajo se muestra un ejemplo de uso completo.
 +
 +==== Funciones de registro ====
 +=== CreateProfile ===
 +^ Nombre | <nowiki>createprofile</nowiki>(usuario, servidor) |
 +^ Parámetro ^ Descripción ^
 +| usuario | Nombre de usuario de la cuenta SIP. |
 +| servidor | Dominio del servidor SIP. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").CreateProfile "usuario", "servidor.org"
 +</code>
 +
 +=== SetPassword ===
 +\\
 +^ Nombre | <nowiki>setpassword</nowiki>(password) |
 +^ Parámetro ^ Descripción ^
 +| password | Define la contraseña de la cuenta SIP. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetPassword "pass"
 +</code>
 +
 +=== SetProtocol ===
 +\\
 +^ Nombre | <nowiki>setprotocol</nowiki>(protocolo) |
 +^ Parámetro ^ Descripción ^
 +| protocolo | Protocolo para conectarse al servidor. Casi siempre es UDP. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetProtocol "UDP"
 +</code>
 +
 +=== SetPort ===
 +\\
 +^ Nombre | <nowiki>setport</nowiki>(puerto) |
 +^ Parámetro ^ Descripción ^
 +| puerto | Puerto al que conectarse del servidor. Casi siempre es 5060. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetPort 5060
 +</code>
 +
 +=== SetSendKeepAlive ===
 +\\
 +^ Nombre | <nowiki>setsendkeepalive</nowiki>(keepalive) |
 +^ Parámetro ^ Descripción ^
 +| keepalive | Define si se debe enviar un paquete de keepalive al servidor. Puede ser true o false. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetSendKeepAlive "true"
 +</code>
 +
 +=== SetOutboundProxy ===
 +\\
 +^ Nombre | <nowiki>setoutboundproxy</nowiki>(direccion) |
 +^ Parámetro ^ Descripción ^
 +| direccion | IP o dominio del servidor proxy para las llamadas salientes, si fuera necesario. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetOutboundProxy "212.212.212.212"
 +</code>
 +
 +=== SetDisplayName ===
 +\\
 +Nombre que se ve al hacer una llamada. Lo proporciona el proveedor <nowiki>voip</nowiki>
 +\\
 +^ Nombre | <nowiki>setdisplayname</nowiki>(nombre) |
 +^ Parámetro ^ Descripción ^
 +| nombre | Nombre que se mostrará. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetProfileName "Test VoIP 01"
 +</code>
 +
 +
 +=== SetProfileName ===
 +\\
 +Define el nombre del perfil que se puede ver en los ajustes de cuentas <nowiki>voip</nowiki>de Android.
 +\\
 +^ Nombre | <nowiki>setprofilename</nowiki>(nombre) |
 +^ Parámetro ^ Descripción ^
 +| nombre | Nombre interno del perfil. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetProfileName "Test VoIP 01"
 +</code>
 +
 +=== AddProfile ===
 +\\
 +Da por válidos el resto de ajustes y crea el perfil.
 +\\
 +^ Nombre | <nowiki>addprofile</nowiki>() |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").AddProfile
 +</code>
 +
 +=== RegisterProfile ===
 +\\
 +Una vez creado el perfil, lo registra para poder recibir llamadas.
 +\\
 +^ Nombre | <nowiki>registerprofile</nowiki>() |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").RegisterProfile
 +</code>
 +
 +=== UnRegisterProfile ===
 +\\
 +Esta llamada desactiva el perfil y no deja pasar ni recibir llamadas. Según la versión de Android, esta llamada puede ser ignorada. [TODO]
 +\\
 +^ Nombre | <nowiki>unregisterprofile</nowiki>() |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").UnRegisterProfile
 +</code>
 +
 +
 +=== SetRingtone ===
 +\\
 +^ Nombre | <nowiki>setringtone</nowiki>(fichero) |
 +^ Parámetro ^ Descripción ^
 +| fichero | Nombre del fichero de sonido que se reproducirá al recibir una llamada desde este perfil. Puede ser .WAV, .MP3 o lo que sea capaz de reproducir el terminal. Se recomienda usar un .WAV no demasiado pesado. |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SetRingtone "ringtone.mp3"
 +</code>
 +
 +==== Funciones de llamada saliente ====
 +=== MakeVoIPCall ===
 +\\
 +^ Nombre | <nowiki>makevoipcall</nowiki>(direccionsip) |
 +^ Parámetro ^ Descripción ^
 +| direccionsip | Dirección a la cual hacer la llamada |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").MakeVoIPCall "test@servidorsip.com"
 +</code>
 +
 +
 +==== Funciones de llamada entrante ====
 +=== AnswerVoIPCall ===
 +\\
 +Responde a la llamada entrante.
 +\\
 +^ Nombre | <nowiki>answervoipcall</nowiki>() |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").MakeVoIPCall "test@servidorsip.com"
 +</code>
 +
 +==== Funciones de llamada ====
 +=== HangVoIPCall ===
 +\\
 +Cuelga la llamada, se haya establecido o no.
 +\\
 +^ Nombre | <nowiki>answervoipcall</nowiki>() |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").HangVoIPCall
 +</code>
 +
 +=== SendDTMF ===
 +\\
 +Envía tonos DTMF en la llamada activa. No suele funcionar, pues sólo existe un codec <nowiki>voip</nowiki> capaz de transportar esta clase de tonos en modo "in-band" (G711) y no es habitual en proveedores <nowiki>voip</nowiki>.
 +\\
 +^ Nombre | <nowiki>senddtmf</nowiki>(numero) |
 +^ Parámetro ^ Descripción ^
 +| numero | Cadena con el número a enviar. Valores posibles: 0123456789ABCD |
 +^ Valor devuelto  | 0 si OK, -1 si error. |
 +
 +Ejemplo de uso:
 +<code vbs>
 +    user("MAP_VOIP").SendDTMF "1234"
 +</code>
 +
 +==== EJEMPLO ====
 +Este es un ejemplo en plan "Walkie-Talkie". Para usarlo cojemos dos teléfonos, en uno cargamos el primer mappings y en el otro el segundo.
 +
 +**Perfil #1:**
 +<code xml>
 +<?xml version="1.0" encoding="iso-8859-1"?>
 +<xml>
 +  <app prefix="gen" version="0.0.0.164" entry-point="TEST" autologon="true" phone-coll="LlamadaEntrante">
 +    <!--
 + <style url="default.css">
 + <style url="default_hor.css" conditions="phone:horizontal"/>
 + <style url="default_tablet.css" conditions="tablet:vertical"/>
 + <style url="default_hor.css" conditions="tablet:horizontal"/>
 + -->
 +  </app>
 +  <collprops type="general">
 +    <coll name="Empresas" title="la empresa" sql="SELECT t1.ID,t1.CODIGO
 + FROM ##PREF##Empresa t1" shadow="false" objname="Empresa" updateobj="Empresa" progid="ASGestion.CASEmpresa" fontsize="9" nomenmask="8" editwidth="101" editheight="97" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="CODIGO" visible="3" group="1" type="N" fieldsize="4" autosearch="true" />
 +    </coll>
 +    <coll name="Usuarios" title="el usuario" sql="SELECT t1.ID,t1.IDEMPRESA,t1.LOGIN,t1.PWD,t1.NOMBRE
 + FROM ##PREF##Usuarios t1" shadow="false" objname="Usuarios" updateobj="Usuarios" progid="ASGestion.CASUser" dropdown="true" editwidth="101" editheight="97" fontsize="9" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="IDEMPRESA" group="1" visible="0" type="N" mapcol="Empresas" mapfld="ID" />
 +      <prop name="LOGIN" visible="3" group="1" type="T" fieldsize="10" fixed-text="true" size="10" />
 +      <prop name="PWD" group="1" type="T" fieldsize="10" fixed-text="true" size="10" visible="" />
 +      <prop name="NOMBRE" visible="3" group="1" type="T" fieldsize="30" fixed-text="true" size="30" />
 +      <prop name="USERTYPE" visible="1" group="1" type="T" fieldsize="30" fixed-text="true" size="50" />
 +      <create>
 +        <action name="setval" field="IDEMPRESA" value="##ENTID##" />
 +      </create>
 +    </coll>
 +    <coll name="Empresas" title="la empresa" sql="SELECT t1.ID,t1.CODIGO
 + FROM ##PREF##Empresa t1" shadow="false" objname="Empresa" updateobj="Empresa" progid="ASGestion.CASEmpresa" fontsize="9" nomenmask="8" editwidth="101" editheight="97" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="CODIGO" visible="3" group="1" type="N" fieldsize="4" autosearch="true" />
 +    </coll>
 +    <coll name="Usuarios" title="el usuario" sql="SELECT t1.ID,t1.IDEMPRESA,t1.LOGIN,t1.PWD,t1.NOMBRE
 + FROM ##PREF##Usuarios t1" shadow="false" objname="Usuarios" updateobj="Usuarios" progid="ASGestion.CASUser" dropdown="true" editwidth="101" editheight="97" fontsize="9" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="IDEMPRESA" group="1" visible="0" type="N" mapcol="Empresas" mapfld="ID" />
 +      <prop name="LOGIN" visible="3" group="1" type="T" fieldsize="10" fixed-text="true" size="10" />
 +      <prop name="PWD" group="1" type="T" fieldsize="10" fixed-text="true" size="10" visible="" />
 +      <prop name="NOMBRE" visible="3" group="1" type="T" fieldsize="30" fixed-text="true" size="30" />
 +      <prop name="USERTYPE" visible="1" group="1" type="T" fieldsize="30" fixed-text="true" size="50" />
 +      <create>
 +        <action name="setval" field="IDEMPRESA" value="##ENTID##" />
 +      </create>
 +    </coll>
 +    <coll name="LlamadaEntrante" fontsize="8" title="TEST" objname="TEST" updateobj="TEST" progid="ASData.CASBasicDataObj" sql="SELECT t1.ID
 + FROM ##PREF##TEST t1" filter="" sort="" notab="true">
 +      <group name="General" id="1" />
 +      <frame id="aaa" name="aaa" width="100%" height="100%" />
 +      <prop frame="aaa" name="MAP_TITULO02" type="TL" group="1" title="Llamada entrante!" width="100%" height="15%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_HANG02" type="B" group="1" title="Colgar" method="ExecuteNode(hang)" width="100%" height="20%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_RECIBIR02" type="B" group="1" title="Recibir" method="ExecuteNode(recibir)" width="100%" height="20%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_DTMF02" type="B" group="1" title="Enviar DTMF prueba" method="ExecuteNode(dtmf)" width="100%" height="20%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_SALIR02" type="B" group="1" title="Salir" method="ExecuteNode(salir)" width="100%" height="20%" labelwidth="10" />
 +      <salir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + appdata.FailWithMessage -11888, "##EXITAPP##"
 +   </script>
 +        </action>
 +      </salir>
 +      <recibir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").AnswerVoIPCall
 +          </script>
 +        </action>
 +      </recibir>
 +      <dtmf>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 +          user("MAP_VOIP").SendDTMF "123456789"
 +        </script>
 +        </action>
 +      </dtmf>
 +      <hang>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").HangVoIPCall
 + appdata.FailWithMessage -11888, "##EXITAPP##"
 +          </script>
 +        </action>
 +      </hang>
 +    </coll>
 +    <coll name="TEST" fontsize="8" title="TEST" objname="TEST" updateobj="TEST" progid="ASData.CASBasicDataObj" sql="SELECT t1.ID
 + FROM ##PREF##TEST t1" filter="" sort="" notab="true">
 +      <group name="General" id="1" />
 +      <frame id="aaa" name="aaa" width="100%" height="100%" />
 +      <prop frame="aaa" name="MAP_REGISTRARPERFIL01" type="B" group="1" title="Registrar con perfil #1" method="ExecuteNode(registrarperfil01)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_LLAMARPERFIL02" type="B" group="1" title="Llamar a perfil #2" method="ExecuteNode(llamarperfil02)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_HANG" type="B" group="1" title="Colgar" method="ExecuteNode(hang)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_UNREGISTER" type="B" group="1" title="Unregister" method="ExecuteNode(unregister)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_SALIR" type="B" group="1" title="Salir" method="ExecuteNode(salir)" width="100%" height="14%" labelwidth="10" />
 +      <salir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + appdata.FailWithMessage -11888, "##EXITAPP##"
 +   </script>
 +        </action>
 +      </salir>
 +      <registrarperfil01>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 +          user("MAP_VOIP") = CreateObject("XOneVoIP")
 +          user("MAP_VOIP").CreateProfile "usuario", "iptel.org"
 +          user("MAP_VOIP").SetRingtone "testring.mp3"
 +          user("MAP_VOIP").SetPassword "contraseña"
 +          user("MAP_VOIP").SetProtocol "UDP"
 +          user("MAP_VOIP").SetPort 5060
 +          user("MAP_VOIP").SetProfileName "Test VoIP 01"
 +          user("MAP_VOIP").AddProfile
 +          user("MAP_VOIP").RegisterProfile
 +        </script>
 +        </action>
 +      </registrarperfil01>
 +      <recibir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").AnswerVoIPCall
 +          </script>
 +        </action>
 +      </recibir>
 +      <dtmf>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 +          user("MAP_VOIP").SendDTMF "123456789"
 +        </script>
 +        </action>
 +      </dtmf>
 +      <llamarperfil02>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").MakeVoIPCall "direccionperfil2@iptel.org" 
 +          </script>
 +        </action>
 +      </llamarperfil02>
 +      <hang>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").HangVoIPCall
 +          </script>
 +        </action>
 +      </hang>
 +      <unregister>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").UnRegisterProfile
 +          </script>
 +        </action>
 +      </unregister>
 +    </coll>
 +  </collprops>
 +</xml>
 +</code>
 +
 +**Perfil #2:**
 +<code xml>
 +<?xml version="1.0" encoding="iso-8859-1"?>
 +<xml>
 +  <app prefix="gen" version="0.0.0.164" entry-point="TEST" autologon="true" phone-coll="LlamadaEntrante">
 +    <!--
 + <style url="default.css">
 + <style url="default_hor.css" conditions="phone:horizontal"/>
 + <style url="default_tablet.css" conditions="tablet:vertical"/>
 + <style url="default_hor.css" conditions="tablet:horizontal"/>
 + -->
 +  </app>
 +  <collprops type="general">
 +    <coll name="Empresas" title="la empresa" sql="SELECT t1.ID,t1.CODIGO
 + FROM ##PREF##Empresa t1" shadow="false" objname="Empresa" updateobj="Empresa" progid="ASGestion.CASEmpresa" fontsize="9" nomenmask="8" editwidth="101" editheight="97" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="CODIGO" visible="3" group="1" type="N" fieldsize="4" autosearch="true" />
 +    </coll>
 +    <coll name="Usuarios" title="el usuario" sql="SELECT t1.ID,t1.IDEMPRESA,t1.LOGIN,t1.PWD,t1.NOMBRE
 + FROM ##PREF##Usuarios t1" shadow="false" objname="Usuarios" updateobj="Usuarios" progid="ASGestion.CASUser" dropdown="true" editwidth="101" editheight="97" fontsize="9" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="IDEMPRESA" group="1" visible="0" type="N" mapcol="Empresas" mapfld="ID" />
 +      <prop name="LOGIN" visible="3" group="1" type="T" fieldsize="10" fixed-text="true" size="10" />
 +      <prop name="PWD" group="1" type="T" fieldsize="10" fixed-text="true" size="10" visible="" />
 +      <prop name="NOMBRE" visible="3" group="1" type="T" fieldsize="30" fixed-text="true" size="30" />
 +      <prop name="USERTYPE" visible="1" group="1" type="T" fieldsize="30" fixed-text="true" size="50" />
 +      <create>
 +        <action name="setval" field="IDEMPRESA" value="##ENTID##" />
 +      </create>
 +    </coll>
 +    <coll name="Empresas" title="la empresa" sql="SELECT t1.ID,t1.CODIGO
 + FROM ##PREF##Empresa t1" shadow="false" objname="Empresa" updateobj="Empresa" progid="ASGestion.CASEmpresa" fontsize="9" nomenmask="8" editwidth="101" editheight="97" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="CODIGO" visible="3" group="1" type="N" fieldsize="4" autosearch="true" />
 +    </coll>
 +    <coll name="Usuarios" title="el usuario" sql="SELECT t1.ID,t1.IDEMPRESA,t1.LOGIN,t1.PWD,t1.NOMBRE
 + FROM ##PREF##Usuarios t1" shadow="false" objname="Usuarios" updateobj="Usuarios" progid="ASGestion.CASUser" dropdown="true" editwidth="101" editheight="97" fontsize="9" filter="" sort="">
 +      <group name="General" id="1" />
 +      <prop name="IDEMPRESA" group="1" visible="0" type="N" mapcol="Empresas" mapfld="ID" />
 +      <prop name="LOGIN" visible="3" group="1" type="T" fieldsize="10" fixed-text="true" size="10" />
 +      <prop name="PWD" group="1" type="T" fieldsize="10" fixed-text="true" size="10" visible="" />
 +      <prop name="NOMBRE" visible="3" group="1" type="T" fieldsize="30" fixed-text="true" size="30" />
 +      <prop name="USERTYPE" visible="1" group="1" type="T" fieldsize="30" fixed-text="true" size="50" />
 +      <create>
 +        <action name="setval" field="IDEMPRESA" value="##ENTID##" />
 +      </create>
 +    </coll>
 +    <coll name="LlamadaEntrante" fontsize="8" title="TEST" objname="TEST" updateobj="TEST" progid="ASData.CASBasicDataObj" sql="SELECT t1.ID
 + FROM ##PREF##TEST t1" filter="" sort="" notab="true">
 +      <group name="General" id="1" />
 +      <frame id="aaa" name="aaa" width="100%" height="100%" />
 +      <prop frame="aaa" name="MAP_TITULO02" type="TL" group="1" title="Llamada entrante!" width="100%" height="15%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_HANG02" type="B" group="1" title="Colgar" method="ExecuteNode(hang)" width="100%" height="20%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_RECIBIR02" type="B" group="1" title="Recibir" method="ExecuteNode(recibir)" width="100%" height="20%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_DTMF02" type="B" group="1" title="Enviar DTMF prueba" method="ExecuteNode(dtmf)" width="100%" height="20%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_SALIR02" type="B" group="1" title="Salir" method="ExecuteNode(salir)" width="100%" height="20%" labelwidth="10" />
 +      <salir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + appdata.FailWithMessage -11888, "##EXITAPP##"
 +   </script>
 +        </action>
 +      </salir>
 +      <recibir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").AnswerVoIPCall
 +          </script>
 +        </action>
 +      </recibir>
 +      <dtmf>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 +          user("MAP_VOIP").SendDTMF "123456789"
 +        </script>
 +        </action>
 +      </dtmf>
 +      <hang>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").HangVoIPCall
 + appdata.FailWithMessage -11888, "##EXITAPP##"
 +          </script>
 +        </action>
 +      </hang>
 +    </coll>
 +    <coll name="TEST" fontsize="8" title="TEST" objname="TEST" updateobj="TEST" progid="ASData.CASBasicDataObj" sql="SELECT t1.ID
 + FROM ##PREF##TEST t1" filter="" sort="" notab="true">
 +      <group name="General" id="1" />
 +      <frame id="aaa" name="aaa" width="100%" height="100%" />
 +      <prop frame="aaa" name="MAP_REGISTRARPERFIL02" type="B" group="1" title="Registrar con perfil #2" method="ExecuteNode(registrarperfil02)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_LLAMARPERFIL01" type="B" group="1" title="Llamar a perfil #1" method="ExecuteNode(llamarperfil01)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_HANG" type="B" group="1" title="Colgar" method="ExecuteNode(hang)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_UNREGISTER" type="B" group="1" title="Unregister" method="ExecuteNode(unregister)" width="100%" height="14%" labelwidth="10" />
 +      <prop frame="aaa" name="MAP_SALIR" type="B" group="1" title="Salir" method="ExecuteNode(salir)" width="100%" height="14%" labelwidth="10" />
 +      <salir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + appdata.FailWithMessage -11888, "##EXITAPP##"
 +   </script>
 +        </action>
 +      </salir>
 +      <registrarperfil02>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 +          user("MAP_VOIP") = CreateObject("XOneVoIP")
 +          user("MAP_VOIP").CreateProfile "contraseña", "iptel.org"
 +          user("MAP_VOIP").SetRingtone "testring.mp3"
 +          user("MAP_VOIP").SetPassword "contraseña"
 +          user("MAP_VOIP").SetProtocol "UDP"
 +          user("MAP_VOIP").SetPort 5060
 +          user("MAP_VOIP").SetProfileName "Test VoIP 02"
 +          user("MAP_VOIP").AddProfile
 +          user("MAP_VOIP").RegisterProfile
 +        </script>
 +        </action>
 +      </registrarperfil02>
 +      <recibir>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").AnswerVoIPCall
 +          </script>
 +        </action>
 +      </recibir>
 +      <dtmf>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 +          user("MAP_VOIP").SendDTMF "123456789"
 +        </script>
 +        </action>
 +      </dtmf>
 +      <llamarperfil01>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").MakeVoIPCall "direccionperfil1@iptel.org" 
 +          </script>
 +        </action>
 +      </llamarperfil01>
 +      <hang>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").HangVoIPCall
 +          </script>
 +        </action>
 +      </hang>
 +      <unregister>
 +        <action name="runscript" type="runscript">
 +          <script language="VBScript">
 + user("MAP_VOIP").UnRegisterProfile
 +          </script>
 +        </action>
 +      </unregister>
 +    </coll>
 +  </collprops>
 +</xml>
 +</code>