<p dir="ltr">Think it is only one way do it. Gateway can help if incaming use gateway registration data.</p>
<p dir="ltr">Also you can add custom headers to invite and transfer that call from default to custom context. But that way must be protected by ACL, encryption or similar way. If you do not make protection, then fraud may be posible.</p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 7, 2015, 18:36 Stanislav Sinyagin <<a href="mailto:ssinyagin@gmail.com">ssinyagin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">you can create a new SIP profile, bind it to a different UDP port, and<br>
direct all calls to a special context.<br>
<br>
On Wed, Oct 7, 2015 at 5:15 PM, Gonzalo Gasca Meza<br>
<<a href="mailto:gascagonzalo@gmail.com" target="_blank">gascagonzalo@gmail.com</a>> wrote:<br>
> I have a SIP Provider which has 4 IP addresses in US. They send SIP calls<br>
> from any of those 4 IPs to my Freeswitch. **They do not require<br>
> authentication, nor SIP Trunk registration, just purely send a SIP INVITE**<br>
><br>
> Incoming calls work fine except that I want to assign a context when I<br>
> receive an incoming call from this ITSP at gateway level.<br>
> Gateway xml file is configured under external folder.<br>
> (../conf/sip_profiles/external/)<br>
><br>
> I can see in packet capture and in freeswitch.log call comes from correct ip<br>
> and port, but is always routed to context default. Hence I need to configure<br>
> something there. Is it possible to define context at gateway level?<br>
><br>
> Console trace:<br>
> <a href="http://pastebin.com/NzzLAK8U" rel="noreferrer" target="_blank">http://pastebin.com/NzzLAK8U</a><br>
> Freeswitch trace<br>
> <a href="http://pastebin.com/YUYVLfyY" rel="noreferrer" target="_blank">http://pastebin.com/YUYVLfyY</a><br>
><br>
> I defined my 4 SIP Gateways (status up) as follows: (1 for each IP address)<br>
><br>
> <gateway name="itsp-inbound-us1"><br>
><br>
> <param name="auth-calls" value="false"/><br>
><br>
> <param name="proxy" value="54.172.60.0"/><br>
><br>
> <param name="register" value="false"/><br>
><br>
> <param name="context" value="itsp"/><br>
><br>
> <param name="username" value="not-required"/><br>
><br>
> <param name="password" value="not-required"/><br>
><br>
> <param name="from-user" value="not-required"/><br>
><br>
> <param name="expire-seconds" value="600"/><br>
><br>
> <param name="extension" value="1000"/><br>
><br>
> </gateway><br>
><br>
><br>
>>sofia profile external gwlist<br>
><br>
> itsp-inbound-us4 itsp-inbound-us3 itsp-inbound-us2 itsp-inbound-us1<br>
><br>
>> sofia status gateway itsp-inbound-us1<br>
><br>
> Name itsp-inbound-us1<br>
><br>
> Profile external<br>
><br>
> Scheme Digest<br>
><br>
> Realm 54.172.60.0<br>
><br>
> Username not-required<br>
><br>
> Password yes<br>
><br>
> From <<a href="mailto:sip%3Anot-required@54.172.60.0" target="_blank">sip:not-required@54.172.60.0</a>><br>
><br>
> Contact<br>
> <sip:gw+itsp-inbound-us1@52.2.15.172:5060;transport=udp;gw=twilio-inbound-us1><br>
><br>
> Exten 1000<br>
><br>
> To <a href="mailto:sip%3Anot-required@54.172.60.0" target="_blank">sip:not-required@54.172.60.0</a><br>
><br>
> Proxy sip:54.172.60.0<br>
><br>
> Context itsp<br>
><br>
> Expires 600<br>
><br>
> Freq 600<br>
><br>
> Ping 0<br>
><br>
> PingFreq 0<br>
><br>
> PingTime 0.00<br>
><br>
> PingState 0/0/0<br>
><br>
> State NOREG<br>
><br>
> Status UP<br>
><br>
> Uptime 536s<br>
><br>
> CallsIN 0<br>
><br>
> CallsOUT 0<br>
><br>
> FailedCallsIN 0<br>
><br>
> FailedCallsOUT 0<br>
><br>
> =================================================================================================<br>
><br>
> Any suggestion?<br>
><br>
><br>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div>