mod_dptools: ring_ready
About
This causes an 180 Ringing to be sent to the originator.
Usage
ring_ready
Examples
<action application="ring_ready" />
<!-- Request a certain tone/file to be played while you wait for the call to be answered-->
<action application="set" data="ringback=%(2000, 4000, 440.0, 480.0)"/>
<!--<action application="set" data="ringback=/home/ring.wav"/>-->
An example which allows incoming calls to be left ringing while an event driven API is used to control the call.
When an incoming call arrives for DDI 012345678 it is acknowledged with a “180 Ringing" and then the call is held ringing while the rule goes to sleep. On sleep expiry the call is cleared. This means any incoming call that is not processed using an API method will be automatically cleared after 3 mins.
This makes a nice neat way of holding incoming calls ringing.
Many carriers do not like to hold calls unsupervised in a ringing (or unanswered) state for long periods of time. FreeSWITCH might be processing your calls as intended, but the carrier might drop them after a shorter period of time than is allowed by the following example.
<extension name="DP_name">
<condition field="destination_number" expression="^012345678$">
<action application="set" data="domain_name=$${domain}"/>
<action application="ring_ready" />
<!-- Remain in the ringing state for a max of 3 minutes (time in milliseconds) -->
<action application="sleep" data="180000"/>
<!-- #########################################################
Alternative actions can be automatically performed when the sleep duration is exceeded
Simply comment out the unwanted actions;
if no actions are specified then the call hangs up anyway
#########################################################
-->
<!-- EITHER ======> hang up the call if this is required action on no answer
refer to http://wiki.freeswitch.org/wiki/Hangup_causes for the cause code data. -->
<!--<action application="hangup" data="NO_ANSWER"/>-->
<!-- OR ======> Redirect if this is required action on no answer -->
<!--<action application="redirect" data="sip:foo@bar.com "/>-->
<!-- OR ======> Reject the call if this is required action on no answer (use the correct cause code) -->
<action application="respond" data="407"/>
</condition>
</extension>
The name of the application changed from ringback to '''ring_ready'''
See Also
- [[Custom_Ring_Back_Tones]]
- __Channel Variables)
- Dialplan
- [[180 vs. 183 vs. Early Media]]