<html><head><meta http-equiv="Content-Type" content="text/html charset=koi8-r"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">The issue with gateways, is you can not depend on us being able to match that the call actually came from that "gateway". Carriers do all kinds of strange things in how they send calls. What i typically do is either treat all calls from the outside world as public, or use ip matching in dialplan if I know for sure that it is going to be stable to change context.<div><br></div><div><br><div><div>On Sep 3, 2014, at 8:27 AM, Pavel <<a href="mailto:my.post@hotmail.com">my.post@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><br>Thanks for your answer. But I found <a href="https://wiki.freeswitch.org/wiki/Authentication" target="_blank">https://wiki.freeswitch.org/wiki/Authentication</a> page which mentions the context as a parameter of gateway. Can we somehow use it ?<br><div><hr id="stopSpelling">Date: Wed, 3 Sep 2014 07:55:26 -0400<br>From: <a href="mailto:rtreleaven@bunnykick.ca">rtreleaven@bunnykick.ca</a><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>Subject: Re: [Freeswitch-users] How to place incoming unauth calls to different contexts.<br><br><div dir="ltr">Pavel gateways do not have a context property.<div>Transfer calls to the desired context via the dialplan.</div><div><br></div></div><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">On Wed, Sep 3, 2014 at 7:35 AM, Pavel<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:my.post@hotmail.com" target="_blank">my.post@hotmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="ecxgmail_quote" style="border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div><div dir="ltr"><div dir="ltr">Hello Everyone !<div><br></div><div>My /sip_profiles/external.xml looks like:</div><div><br></div><div><div><profile name="external"></div><div> <gateways></div><div> <gateway name="gw1"></div><div> <param name="username" value="username"/></div><div> <param name="realm" value="192.168.1.1"/></div><div> <param name="password" value="password"/></div><div> <param name="proxy" value="192.168.1.1"/></div><div> <param name="register" value="false"/></div><div> <param name="context" value="gw1"/></div><div> </gateway></div><div> <gateway name="gw2"></div><div> <param name="username" value="username"/></div><div> <param name="realm" value="192.168.1.2"/></div><div> <param name="password" value="password"/></div><div> <param name="proxy" value="192.168.1.2"/></div><div> <param name="register" value="false"/></div><div> <param name="context" value="gw2"/></div><div> </gateway><span style="white-space: pre-wrap;">        </span> </div><div> </gateways></div><div> <aliases></div><div> <alias name="outbound"/></div><div> <alias name="nat"/></div><div> </aliases></div><div> <domains></div><div> <domain name="all" alias="false" parse="true"/></div><div> </domains></div><div> <settings></div><div> <param name="debug" value="0"/></div><div> <param name="sip-trace" value="no"/></div><div> <param name="sip-capture" value="no"/></div><div> <param name="rfc2833-pt" value="101"/></div><div> <param name="sip-port" value="$${external_sip_port}"/></div><div> <param name="dialplan" value="XML"/></div><div> <param name="context" value="public"/></div><div> <param name="dtmf-duration" value="2000"/></div><div> <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/></div><div> <param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/></div><div> <param name="hold-music" value="$${hold_music}"/></div><div> <param name="rtp-timer-name" value="soft"/></div><div> <param name="local-network-acl" value="localnet.auto"/></div><div> <param name="manage-presence" value="false"/></div><div> <param name="inbound-codec-negotiation" value="generous"/></div><div> <param name="nonce-ttl" value="60"/></div><div> <param name="auth-calls" value="false"/></div><div> <param name="inbound-late-negotiation" value="true"/></div><div> <param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) --></div><div> <param name="rtp-ip" value="$${local_ip_v4}"/></div><div> <param name="sip-ip" value="$${local_ip_v4}"/></div><div> <param name="ext-rtp-ip" value="auto-nat"/></div><div> <param name="ext-sip-ip" value="auto-nat"/></div><div> <param name="rtp-timeout-sec" value="300"/></div><div> <param name="rtp-hold-timeout-sec" value="1800"/></div><div> <param name="tls" value="$${external_ssl_enable}"/></div><div> <param name="tls-only" value="false"/></div><div> <param name="tls-bind-params" value="transport=tls"/></div><div> <param name="tls-sip-port" value="$${external_tls_port}"/></div><div> <param name="tls-passphrase" value=""/></div><div> <param name="tls-verify-date" value="true"/></div><div> <param name="tls-verify-policy" value="none"/></div><div> <param name="tls-verify-depth" value="2"/></div><div> <param name="tls-verify-in-subjects" value=""/></div><div> <param name="tls-version" value="$${sip_tls_version}"/></div><div> </settings></div><div></profile></div></div><div><br></div><div><br></div><div>Incoming unauthenticated calls from either gw1 or gw2 keep hitting context "public". Any way to place them in the appropriate contexts (eg. "gw1" and "gw2").</div><div><br></div><div><br></div><div>Thanks for your attention.</div><div><br></div><div><br></div><div>Rergards,</div><div>Pavel.</div></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></body></html>