<div dir="ltr">I have question about how to stop INVITE coming from unknown source or not subscribed user. <div><br></div><div>I have opensips front end proxy and Freeswitch PSTN <br></div><div><br></div><div>But recently i have seeing some calls coming from unknown source and method is INVITE so it is sending direct INVITE to opensips and opensips forwarding them to Freeswitch, How do i tell opensip if INVITE from non-registered user then drop it. <br></div><div><br></div><div>As you see in Freeswitch section, if you see INVITE forward it to Freeswitch, How do i check INVITE is authenticated or not? </div><div><br></div><div>This is what i have in cfg. </div><div><br></div><div>....</div><div>....</div><div><div> if (is_from_local())</div><div>                {</div><div><br></div><div>                        # authenticate if from local subscriber</div><div>                        # authenticate all initial non-REGISTER request that pretend to be</div><div>                        # generated by local subscriber (domain from FROM URI is local)</div><div>                        if (!check_source_address(&quot;2&quot;)) {</div><div>                        if (!proxy_authorize(&quot;&quot;, &quot;subscriber&quot;)) {</div><div>                                proxy_challenge(&quot;&quot;, &quot;0&quot;);</div><div>                                exit;</div><div>                        }</div><div>                        consume_credentials();</div><div>                        # caller authenticated</div><div>                        }</div><div>                } else {</div><div>                        # if caller is not local, then called number must be local</div><div><br></div><div>                        if (!is_uri_host_local()) {</div><div>                                send_reply(&quot;403&quot;,&quot;Rely forbidden&quot;);</div><div>                                exit;</div><div>                        }</div><div>                }</div><div><br></div><div>        }</div></div><div><br></div><div><div> # To FreeSWITCH</div><div>        if (is_method(&quot;INVITE&quot;)) {</div><div>        if  ( uri=~&quot;^sip:[1-9][0-9]{10,15}@.*&quot;) {</div><div>                xlog(&quot;Sending call to   ===&gt; Freeswitch\n&quot;);</div><div>                route(&quot;to_dispatcher&quot;);</div><div>                exit;</div><div>                };</div><div>        }</div></div><div><br></div></div>