Misc. Dialplan Tools respond
From FreeSWITCH Wiki
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}"/>
</condition>
</extension>
<extension name="check_auth" continue="true">
<condition field="${sip_authorized}" expression="^true$" break="never">
<anti-action application="respond" data="407"/>
</condition>
</extension>
<extension name="echo">
<condition field="destination_number" expression="^9996$">
<action application="answer"/>
<action application="echo"/>
</condition>
</extension>
In this example anyone would be able to call the hold_music extension but only authorised 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="respond" data="407 ${sip_from_host}"/>
TESTED AND WORKS
