Set a channel variable in callflow

124 views
Skip to first unread message

cecchisandrone

unread,
Jun 16, 2017, 10:18:28 AM6/16/17
to 2600hz-dev
Hello,

I'm trying to set a channel variable that I need for Homer in order to correlate legs as indicated here https://github.com/sipcapture/homer/wiki/Examples%3A-FreeSwitch#b2bua-correlation.
I tried the following callflow using Pivot:

{
    "data": {
        "channel": "both",
        "value": "${Call-ID}",
        "variable": "sip_h_X-cid"
    },
    "module": "set_variable",
    "children": {
        "_": {
            "data": {"to_did":"+xxxxxxxxxx"},
            "module": "resources"            
        }
    }
}

I noticed two problems:
1) Variable name is not set as I want and if check fs_cli I can see ecallmgr_undefined=staticvalue (using a static value instead a placeholder)
2) If I try ${Call-ID} I also receive this error in FS:
2017-06-16 08:30:17.742488 [CRIT] switch_channel.c:1407 Invalid data (${ecallmgr_undefined} contains a variable)
so it seems placeholder is incorrect and cannot be resolved in FS

Is there a special syntax that should I respect to set channels variables?

I was checking https://github.com/2600hz/kazoo/blob/96d240ef3821eb90371f8def77858576e3fe985c/applications/ecallmgr/src/ecallmgr.hrl but since I'm not an expert in Erlang I don't understand if I need to modify source code to do this.

Thanks for your suggestions.

cecchisandrone

unread,
Jun 21, 2017, 4:10:33 AM6/21/17
to 2600hz-dev
Any hint on this guys?
Reply all
Reply to author
Forward
0 new messages