A separate context for each sounds messy.
Indeed, try INFO, but I don't think we actually have a variable for the gateway.
However, you can set a channel variable on inbound calls on the gateway: 
http://wiki.freeswitch.org/wiki/Clarification:gateways#Variables

e.g.<variables> <variable name="gateway" data="flowroute" direction="inbound"/></variables>

-Avi



On Mon, Aug 27, 2012 at 2:03 PM, Patrick Lists <freeswitch-list@puzzled.xs4all.nl> wrote:
On 27-08-12 06:47, Pip Live wrote:
> Sorry this maybe a very simple question but I checked Wiki/Dialplan
> without finding an answer.
>
> How can I know inbound call arrive at which sofia gateway in dialplan?
> My purpose is to add a prefix to all inbound call from a certain
> gateway. I cannot use the "destination_number" built_in variable for
> this purpose, as in my case DID bind to a specific gateway hardware is
> often changing. Is that another varialbe to be used, eg. a gateway name etc?

Until someone comes up with a better answer, have you tried running the
info app on the incoming call? It gives a ton of info about the channel.

http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_info

Regards,
Patrick


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

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