Gateway context for incoming calls
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
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Its worse.. the only way you can map an inbound call back to the gateway in question is the far side has to call the registered contact you sent on outbound registration. Most services don't follow this rule. /b On Mar 13, 2010, at 12:59 AM, Michael Collins wrote:
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
participants (3)
-
Brian West
-
Michael Collins
-
Tim St. Pierre