The <PreAnswer> element answers the incoming call in early media mode. This is useful to play custom caller tunes or to speak specified text dynamically while the call is still in an unanswered state.

You may nest <Speak>, <Play>, <Wait>, <GetDigits>, <GetSpeech>, <Redirect> and <SIPTransfer> elements within <PreAnswer>. These will work the way they do, without answering the call.

Element Attributes

The <PreAnswer> element has no attributes.

Examples

Example 1: PreAnswer

Playing caller tune in early media mode.

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
     <PreAnswer>
	<Play>http://www.plivo.org/sounds/Trumpet.mp3</Play>
     </PreAnswer>
     <Speak>Hey, thanks for dropping by.</Speak>
     <Hangup />
</Response>

Comments are closed.