Custom Ring Back Tones

From FreeSWITCH Wiki

Jump to: navigation, search

Contents

Ringback

This addition lets you set artifical ringback on a channel that is waiting for an originated call to be answered.

The syntax is

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

where data is either the full path to an audio file or teletone generation markup language..


Example

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


Example2

You can send ringback after the call is answered


 def handler(uuid):
    session = PySession(uuid)
    session.answer()
    session.speak("Hello, connecting your call to the first available agent")
    session.execute("set","call_timeout=30")
    session.execute("set","continue_on_fail=true")
    session.execute("set","hangup_after_bridge=true")
    session.execute("set","ringback=%(2000,4000,440.0,480.0)")
    session.execute("bridge","sofia/foo/bar@test.com,sofia/foo/baz@test2.com:5070")
    session.speak("doh!")

Transfer_Ringback

This is the sound that will play while waiting for someone to answer on a transferred call.

<action application="set" data="transfer_ringback=[data]"/>

where data is either the full path to an audio file or teletone generation markup language..

Example

<action application="set" data="transfer_ringback=${us-ring}"/>
Personal tools
Community