<div dir="auto">Wouldn't it be simpler to make :5060 the unauthenticated port and :5080 the authenticated?</div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 5, 2017 7:58 AM, "Mimiko" <<a href="mailto:vbvbrj@gmail.com" target="_blank">vbvbrj@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04.01.2017 19:07, Anthony Minessale wrote:<br>
> My questions are:<br>
><br>
> 1) Does this type of combination affect security?<br>
> 2) How to impose all registered phones to make authenticated calls<br>
> always? So they will not go first thru public context and then to<br>
> default?<br>
><br>
><br>
> Its a lot to go through for the vanity of not having to type 5080 once<br>
> in a config box, but that's just my opinion ;)<br>
><br>
> You can use the set_user app to make unauthenticated calls get the same<br>
> data as authenticated calls would have on a specified exten.<br>
<br>
Anthony thank you for suggestion.<br>
<br>
Taking this public dialplan:<br>
<br>
<context name="public"><br>
<extension name="unloop"><br>
<condition field="${unroll_loops}" expression="^true$"/><br>
<condition field="${sip_looped_call}" expression="^true$"><br>
<action application="deflect" data="${destination_number}"/><br>
</condition><br>
</extension><br>
<extension name="sip_nat_detected" continue="true"><br>
<condition field="${sip_nat_detected}" expression="^true$"><br>
<action application="set" inline="true"<br>
data="sip-force-contact=NDLB-<wbr>connectile-dysfunction"/><br>
</condition><br>
<extension name="public_did"><br>
<condition field="destination_number" expression="^([5-8]\d\d)$"><br>
<action application="transfer" data="$1 XML default"/><br>
</condition><br>
</extension><br>
</extension><br>
<extension name="check_auth" continue="true"><br>
<condition field="${sip_authorized}" expression="^true$" break="never"><br>
<anti-action application="set" data="process_cdr=false"/><br>
<anti-action application="respond" data="407"/><br>
</condition><br>
</extension><br>
</context><br>
<br>
Where to put the set_user app? If I'll put it before "check_auth"<br>
extension like:<br>
<br>
<action application="set_user" data="${caller_id_number}@${<wbr>domain}"/><br>
<br>
Then any one calling from internet could set theirs caller_id_number to<br>
internal's one and act on behalf of some registered user to fraud.<br>
<br>
Or may be first extension in public dialplan to put something which will<br>
check, based on caller_id_number, if there is a registered user and<br>
impose to make authenticate call, like:<br>
<br>
<extension name="check_user_registered"><br>
<condition field="${sofia_contact(${<wbr>caller_id_number})}"<br>
expression="^error/" break="on-false"><br>
<anti-action application="set" data="process_cdr=false"/><br>
<anti-action application="respond" data="407"/><br>
</condition><br>
</extension><br>
<br>
PS: Yes, its not to big to add :5080, but take callers that want to call<br>
from mobile via internet using a sip uri. Even myself forgets to add<br>
port number at the end. :)<br>
<br>
--<br>
Mimiko desu.<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div></div>