Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

TwiML™ Voice: <Sim>


The <Dial> verb's <Sim> noun specifies a Programmable Wireless SIM to dial.

In order to make a call to a SIM, voice_enabled must be set to true in the SIM's Rate Plan. See the Programmable Wireless voice overview for details.


Noun Attributes

attributes page anchor

The <Sim> noun does not currently support any of the attributes commonly used with other nouns in the <Dial> verb.


Example 1: Dialing to a SIM

examples-1 page anchor

In this example, we want to connect the current call to a SIM with Sid DE8caa2afb9d5279926619c458dc7098a8. To connect the call to the SIM, use a <Dial> verb with a <Sim> noun nested inside.

Dialing to a SIM

dialing-to-a-sim page anchor
Node.js
Python
C#
Java
PHP
Ruby

_10
const VoiceResponse = require('twilio').twiml.VoiceResponse;
_10
_10
_10
const response = new VoiceResponse();
_10
const dial = response.dial();
_10
dial.sim('DE8caa2afb9d5279926619c458dc7098a8');
_10
_10
console.log(response.toString());

Output

_10
<?xml version="1.0" encoding="UTF-8"?>
_10
<Response>
_10
<Dial>
_10
<Sim>DE8caa2afb9d5279926619c458dc7098a8</Sim>
_10
</Dial>
_10
</Response>

Example 2: Dialing to a SIM with recording enabled

examples-2 page anchor

In this case, we want to record both legs of the call when dialing a Sim using <Dial>.

Dialing to a SIM with recording enabled

dialing-to-a-sim-with-recording-enabled page anchor
Node.js
Python
C#
Java
PHP
Ruby

_10
const VoiceResponse = require('twilio').twiml.VoiceResponse;
_10
_10
_10
const response = new VoiceResponse();
_10
const dial = response.dial({
_10
record: 'record-from-ringing'
_10
});
_10
dial.sim('DE8caa2afb9d5279926619c458dc7098a8');
_10
_10
console.log(response.toString());

Output

_10
<?xml version="1.0" encoding="UTF-8"?>
_10
<Response>
_10
<Dial record="record-from-ringing">
_10
<Sim>DE8caa2afb9d5279926619c458dc7098a8</Sim>
_10
</Dial>
_10
</Response>


Rate this page: