4 This context is usually accessed via the external sip profile listening on port 5080.
6 It is recommended to have separate inbound and outbound contexts. Not only for security
7 but clearing up why you would need to do such a thing. You don't want outside un-authenticated
8 callers hitting your default context which allows dialing calls thru your providers and results
12 <!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
14 <context name="public">
16 <extension name="unloop">
17 <condition field="${unroll_loops}" expression="^true$"/>
18 <condition field="${sip_looped_call}" expression="^true$">
19 <action application="deflect" data="${destination_number}"/>
23 Tag anything pass thru here as an outside_call so you can make sure not
24 to create any routing loops based on the conditions that it came from
25 the outside of the switch.
27 <extension name="outside_call" continue="true">
29 <action application="set" data="outside_call=true"/>
30 <action application="set" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
34 <extension name="call_debug" continue="true">
35 <condition field="${call_debug}" expression="^true$" break="never">
36 <action application="info"/>
40 <extension name="public_extensions">
41 <condition field="destination_number" expression="^(10[01][0-9])$">
42 <action application="transfer" data="$1 XML default"/>
47 You can place files in the public directory to get included.
49 <X-PRE-PROCESS cmd="include" data="public/*.xml"/>
51 If you have made it this far lets challenge the caller and if they authenticate
52 lets try what they dialed in the default context. (commented out by default)
55 <extension name="check_auth" continue="true">
56 <condition field="${sip_authorized}" expression="^true$" break="never">
57 <anti-action application="respond" data="407"/>
61 <extension name="transfer_to_default">
63 <action application="transfer" data="${destination_number} XML default"/>