twiml-0.2.0.0: TwiML library for Haskell

Copyright(C) 2014-15 Mark Andrus Roberts
LicenseBSD-style (see the file LICENSE)
MaintainerMark Andrus Roberts <markandrusroberts@gmail.com>
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Text.XML.Twiml.Verbs.Dial

Contents

Description

The examples in this file assume

{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RecordWildCards #-}

import Prelude
import Text.XML.Twiml
import qualified Text.XML.Twiml.Syntax as Twiml

For more information, refer to Twilio's TwiML Reference for <Dial>.

Synopsis

Documentation

dial :: IsTwimlLike f Dial => String -> DialAttributes -> TwimlLike f Dial () Source

Dial a number. Example:

example :: VoiceTwiml
example =
  response $ do
    dial "415-123-4567" def
    say "Goodbye" def
    end
  where Twiml.Syntax{..} = def
>>> show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>415-123-4567</Dial>
  <Say>Goodbye</Say>
</Response>

dial' :: IsTwimlLike f Dial => Either DialNoun String -> DialAttributes -> TwimlLike f Dial () Source

Dial a number or DialNoun. Example:

example :: VoiceTwiml
example =
  response $ do
    dial' (Left $ Number def "+15558675309") $ def
             & callerId .~ Just "+15551112222"
    end
  where Twiml.Syntax{..} = def
>>> show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial callerId="+15551112222">
    <Number>+15558675309</Number>
  </Dial>
</Response>

data DialF i a Source

Instances

Nouns

Client

Conference

Number

Queue

data QueueF i a Source

Instances

Sip

data Sip Source

data SipF i a Source

Instances