<!-- Example extension for require auth per-call. -->
<extension name="us_national">
<!-- Match the destination digits of 1NxxNxxxxxx -->
<condition field="destination_number" expression="^1?([2-9]\d\d[2-9]\d{6})$"/>
<!-- Make sure the sip_authorized variable is set (set on all authed calls)
If it isn't, then send an auth challange.
-->
<condition field="${sip_authorized}" expression="true">
<anti-action application="reject" data="407"/>
</condition>
<!-- If you made it here all is well and the call is authed.
Do whatever you wish.
-->
<condition>
<action application="info"/>
<action application="bridge" data="sofia/$${sip_profile}/1$1@207.210.228.173"/>
</condition>
</extension>