I'm new to freeswitch and trying to figure it out.
I'm having issues getting a basic configuration/dialplan going in order for a new request coming in from SIPP (LEG A) to be routed to its destination (Another SIPP client).
I don't have extensions, I want the request to be B2BUA'ed by freeswitch (I think this is called bridged) and then the new INVITE should be sent to the destination specified in the INVITE of LEG A (if there are route headers then the top route header, otherwise the request URI).
All I can find is how to set up freeswitch to forward a call to a preconfigured (hard coded) extension but how can I let it route to a dynamic route like this?
<include>
<extension name="test">
<condition>
<action application="bridge" data="what to put here?"/>
</condition>
</extension>
</include>
I've manage to get it working:
<action application="bridge" data="sofia/${sip_req_host}/${sip_req_uri}"/>
This will forward the request to the incoming requet's request-uri. One can build conditions around this line to check for any route headers and send the request there instead.
The info application helped a lot in figuring out what variables are available in the dial plan:
<action application="info"/>