Skip to main content


Created by Ryan Harris, last modified on 2018.02.07


string This addition lets you set artificial ringback on a channel that is waiting for an originated call to be answered. This will specify the audio to play to the A leg on unanswered aka (early media) calls.

Syntax: <action application="set" data="ringback=[data]"/>

Where data is either the full path ((warning) must be full path!) to an audio file or teletone generation markup language.

You may also combine this with the ring_ready application. In this case the caller hears the normal ringback tone for a fraction of a second, then he hears the defined ringback media.

(info) Since r15025 local ringback tone is generated only when there is no early media. To force local ringback despite early media use the ignore_early_media channel variable.

(info) Ringback will not be sent unless the variable is set and there's a ringing indication from the party that is being called. See instant_ringback if you want to fake ringback even when ringing indication hasn't been received yet.


Using the French ring tone defined in vars.xml:

<action application="set" data="ringback=${fr-ring}"/>

US ring tone:

<action application="set" data="ringback=%(2000,4000,440.0,480.0)"/>

You can send ringback after the call is answered:

def handler(uuid):
session = PySession(uuid)
session.speak("Hello, connecting your call to the first available agent")