Skip to main content

mod_dptools: media_reset

About

Reset all bypass/proxy media flags.

Usage

Use this application if you need to reset the media flags of a session before bridging a subsequent call.

Consider this use case:

Initially, A-Leg is bridged with:

<action application="set" data="continue_on_fail=true"/>
<action application="set" data="bypass_media=true"/>
<action application="set" data="inherit_codec=true"/>

Our first attempt is to leave FS out of the media path and let A-Leg and B-Leg to exchange media. This is good for performance.

What if the call is rejected with Status 488? This normally means that negotiation between A-leg and B-leg has not been successful. In that case we can either relay 488 to the A-leg, or we can try to resend the call with a new set of codecs.

Before media_reset existed we tried:

<action application="set" data="bypass_media=false"/>
<action application="set" data="inherit_codec=false"/>
<action application="export" data="nolocal:absolute_codec_string=(...)"/> //the new set of codecs
<action application="bridge" data="(...)"/> //bridge dialstring

This approach failed. If this second call was successful the provisional responses (180, 183) failed to be relayed to the A-leg. Once the call connected the audio session was correctly established, but there was no ringback tone (or any other early media).

The application media_reset fixes this. The dialplan xml chunk of this second call becomes simply this:

<action application="media_reset"/>
<action application="export" data="nolocal:absolute_codec_string=(...)"/> //the new set of codecs
<action application="bridge" data="(...)"/> //bridge dialstring

Examples

  • Examples needed

See Also