Tag
The Tag verb is used to set a new tag value without executing a callback. This new tag will be sent with
all future callbacks unless overwritten by a future tag
attribute or <Tag>
verb, or cleared.
Text Content
Name | Description |
---|---|
tag | The new tag value. Leading and trailing whitespace is trimmed. Leave blank to clear the tag. |
Attributes
Attribute | Description |
---|---|
None | None |
Webhooks Received
There are no webhooks received after the <Tag>
verb is executed.
Examples
Set the Tag of a Call
- XML
- Java
- C#
- Ruby
- NodeJS
- Python
- PHP
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Tag>audio playing</Tag>
<!-- If the call is hung up during the audio clip, the tag value reported in the disconnect event will be "audio playing" -->
<PlayAudio>https://audio.url/audio1.wav</PlayAudio>
<Tag>audio ended</Tag>
<!-- If the call is hung up after the audio clip, the tag value reported in the disconnect event will be "audio ended" -->
</Response>
Tag tag1 = new Tag("audio playing");
PlayAudio playAudio = new PlayAudio().builder()
.audioUri("https://audio.url/audio1.wav")
.build();
Tag tag2 = new Tag("audio playing");
Response response = new Response()
.withVerbs(tag1,playAudio,tag2);
System.out.println(response.toBXML());
Tag tag1 = new Tag
{
Value = "audio playing"
};
PlayAudio playAudio = new PlayAudio
{
Url = "https://audio.url/audio1.wav"
};
Tag tag2 = new Tag
{
Value = "audio ended"
};
var response = new Response();
response.Add(tag1);
response.Add(playAudio);
response.Add(tag2);
Console.WriteLine(response.ToBXML());
tag_1 = Bandwidth::Bxml::Tag.new('audio playing')
play_audio = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio1.wav')
tag_2 = Bandwidth::Bxml::Tag.new('audio ended')
response = Bandwidth::Bxml::Response.new([tag_1, play_audio, tag_2])
p response.to_bxml
//If the call is hung up during the audio clip, the tag value reported in the disconnect event will be "audio playing"
const tag1 = new Bxml.Tag('audio playing');
const playAudio = new Bxml.PlayAudio('https://audio.url/audio1.wav');
// If the call is hung up after the audio clip, the tag value reported in the disconnect event will be "audio ended"
const tag2 = new Bxml.Tag('audio ended');
const response = new Bxml.Response([tag1, playAudio, tag2]);
console.log(response.toBxml());
tag1 = Tag(
content="audio playing"
)
play_audio = PlayAudio(
audio_uri="https://audio.url/audio1.wav"
)
tag2 = Tag(
content="audio ended"
)
response = Response()
response.add_verb(tag1)
response.add_verb(play_audio)
response.add_verb(tag2)
print(response1.to_bxml())
$tag1 = new BandwidthLib\Voice\Bxml\Tag("audio playing");
$playAudio = new BandwidthLib\Voice\Bxml\PlayAudio("https://audio.url/audio1.wav");
$tag2 = new BandwidthLib\Voice\Bxml\Tag("audio ended");
$response = new BandwidthLib\Voice\Bxml\Response();
$response->addVerb($tag1);
$response->addVerb($playAudio);
$response->addVerb($tag2);
echo $response->toBxml();