When you make an outbound call and then connect that call to a different number using the Dial element, you can play a custom caller tone using the dialMusic attribute.
Plivo requests the dialMusic URL using the POST HTTP method for a valid Play, Speak, or Wait XML element.
To play a message on a call while it’s being connected, you should return the second XML example response.
Copy
Ask AI
from plivo import plivoxmlresponse = plivoxml.ResponseElement()response.add( plivoxml.DialElement(dial_music='https://<yourdomain>.com/dial_music/').add( plivoxml.NumberElement('12025551111')))print(response.to_string())# XML to play the messageplay_message_response = plivoxml.ResponseElement()play_message_response.add( plivoxml.SpeakElement('Your call is being connected'))print(play_message_response.to_string())