[Freeswitch-users] Gateway context for incoming calls

Michael Collins msc at freeswitch.org
Fri Mar 12 22:59:20 PST 2010


Try sending one of these calls to the info application in your public
dialplan. Most likely there will be a few fields which you can key off of in
your dialplan conditions. If your providers have static IPs then you can
always use the network_addr field to match on. Once you match on a
particular IP address (or whichever field) then you can execute the transfer
app and send the call to another context altogether:

<extension name="example IP addr match">
    <condition field="network_addr" expression="^1\.2\.3\.4$"/> <!-- IP addr
of originating server -->
    <condition field="destination_number" expression="^(.*)$">
         <action application="transfer" data="$1 XML my_context"/>
    </condition>
</extension>

Let us know how it goes.
-MC

On Fri, Mar 12, 2010 at 9:34 PM, Tim St. Pierre <
fs-list at communicatefreely.net> wrote:

> Hello,
>
> Is there a way for incoming calls from a gateway to go to a context other
> than the default one set
> in the sofia profile?  I need a way to separate calls from providers vs.
> calls from the public at large.
>
> Here's the scenario:
>
> Our external sofia profile maps to the public IP address and listens on
> port 5060.  Our providers
> send calls to this address, but we also need to have anonymous sip calls
> come in to the public
> address, on the default port.  We want the calls from our SIP trunks to get
> billed appropriately,
> and increment our mod_limit counters, etc.  If a call comes in from
> somewhere other than a SIP
> trunk, we want it to have access to extensions, but be rated as a free
> call.
>
> All our SIP trunks are mapped using static addresses - there isn't any
> registration or
> authentication happening in either direction.  Each one has a gateway
> entry.
>
> Thanks!
>
> -Tim
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100312/bbb833b8/attachment-0002.html 


More information about the FreeSWITCH-users mailing list