Skip to main content

mod_dptools: respond


Send SIP session respond code to the SIP device.

Click here to expand Table of Contents


<action application="respond" data="response_info"/>


Respond can be used to do (probably amongst other things) authentication in the dialplan. For example if you want some of the extensions in your dialplan to be public and others to require auth you could do something like the following:

<extension name="hold_music">
<condition field="destination_number" expression="^9999$">
<action application="answer"/>
<action application="playback" data="$${hold_music}"/>

<extension name="check_auth" continue="true">
<condition field="${sip_authorized}" expression="^true$" break="never">
<anti-action application="respond" data="407"/>

<extension name="echo">
<condition field="destination_number" expression="^9996$">
<action application="answer"/>
<action application="echo"/>

In this example anyone would be able to call the hold_music extension but only authorized users would be able to call the echo extension.

The standard config uses the public.xml dialplan to expose some extensions by transferring them into the default context. This is another way of achieving the same thing.

It is possible to specify the domain used in the realm part of the challenge using:

<anti-action application="set" data="sip_challenge_realm=new_realm"/> 
<anti-action application="respond" data="407"/>

You can also send you own Status Text:

<action application="respond" data="480 Try again later"/>



If you disable authentication in a Sofia profile and use respond in the dialplan to do the authentication any ACLs defined in the profile will be useless. They simply don't work if authentication is disabled in the Sofia profile

With previous versions of FreeSWITCH, it was possible to send "180 Ringing" with application respond. Not anymore.
If you need to send "180 Ringing" use application ring_ready instead.

See Also