Skip to content

Commit

Permalink
make the sip example pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Burke committed Mar 7, 2013
1 parent 4dbc0a9 commit ce3567a
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions docs/usage/twiml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,24 @@ To dial out to a Sip number, put the Sip address in the `sip()` method call.
$response = new Services_Twilio_Twiml;
$dial = $response->dial();
$sip = $dial->sip();
$sip->uri('alice@foo.com', array(
$sip->uri('alice@foo.com?X-Header-1=value1&X-Header-2=value2', array(
"username" => "admin",
"password" => "1234",
));
print $response;
.. code-block:: xml
<?xml version="1.0" encoding="UTF‐8"?>
<Response>
<Dial>
<Sip>
<Uri username='admin' password='1234'>alice@foo.com</Uri>
</Sip>
</Dial>
</Response>
<?xml version="1.0" encoding="UTF‐8"?>
<Response>
<Dial>
<Sip>
<Uri username='admin' password='1234'>
alice@foo.com
</Uri>
</Sip>
</Dial>
</Response>
Secondary Verbs
Expand Down

0 comments on commit ce3567a

Please sign in to comment.