Search code examples
freeswitchmod-verto

How do I pass variables from FreeSWITCH dialplan to Verto client?


I ran into many issues when trying to get more information in the Verto client and take advantage of it's impressive features. My use case for retrieving custom variables was to get the 'parent' call UUID so that I could issue ESL commands on the parent channel.

I can now also use this to pass any customer data into the Verto client so I can have one less HTTP request going to my app server (which is already handling the ESL socket/dialplan).

I saw this hint: 'To send custom variables on incoming call to verto end point set variable with name prefix verto_h_ (since 1.6.16)' (Alexandr Popov). This didn't work out of the box though..

SEE MY SOLUTION BELOW..


Solution

  • You must set the dialplan variable with the prefix 'verto_h_', BUT you must make sure it's on the proper channel. My issue was that I was setting this variable on the inbound caller's channel, but not the channels going to the Verto clients.

    So, you can either use the ESL commands for 'export', 'bridge_export', or in the bridge command, set this in the square brackets []. I have been persuaded by one of the FreeSWITCH contributors (Mike Jerris) to use the square brackets. He says that issues may arise from using 'export'.

    The custom value will then be accessible from the verto dialog objects in the params.


    References: