Help with context/variables in gateway configuration

Hi.

I’m new to FS, and I’m having trouble with context for incoming calls. I’m using Freeswitch 1.10.7 on

I’ve created a profile and defined context “entry” in it.

Inside that profile, I’ve created a gateway with context parameter as such:

I’ve also added variables I want on calls that are inbound on this gateway:

But whatever I do, inbound seem to ignore this settings and just end up in “entry” context.

Is there something I’m missing here? Is there a different way of sending a call to profile or gateway?

Thank you for help.

Can you show me your examples?

Hi, sorry for late response.

This is my configuration:

test_gw.xml (from gw folder under sofia profile)

<include>
    <gateway name="TEST_GW1-TEST_GW2">
      <param name="username" value="TEST_GW2-TEST_GW1"/>
      <param name="password" value="********"/>
      <param name="proxy" value="XX:XX:XX:XX:5062"/>
      <param name="realm" value="XX:XX:XX:XX:5062"/>
      <param name="expire-seconds" value="800"/>
      <param name="register" value="true"/>
      <param name="retry-seconds" value="60"/>
      <param name="context" value="new_context"/>
    </gateway>
</include>

In my test.xml profile I have this setting:

                <param name="context" value="entry"/>

When the call arrives over the gateway, I get this in my log:

2023-05-08 08:24:11.909823 [NOTICE] switch_channel.c:1104 New Channel sofia/gw/TEST_GW1-TEST_GW2@XX.XX.XX.XX:5062 [e2e0a2f3-7552-4045-ba7d-7997894fcf04]
2023-05-08 08:24:11.909823 [INFO] mod_dialplan_xml.c:637 Processing +777777<777777>->12312 in context entry

What am I doing wrong here? Why is the call going to entry and not to new_context context?

Thank you for your help.

Unless the remote passes back the contact params, there is no way to match them properly, in addition its not wise to match on a gateway param as it can be forged, you should spin a new profile for a specific gateway.

/b