Outbound Socket - call connects to you
The dialplan application "socket" makes an outbound TCP connection to the specified ip:port and the other end can control the call exactly in the same way as in the inbound connection to mod_event_socket.
You must have a "server" application running, listening to the correct IP address and port, and ready to accept inbound connections from the "socket" dialplan application. Once the TCP connection is established, then commands and output are the same as we saw before.
When you call outbound socket, FreeSWITCH automatically puts the call in parked state.
The syntax for calling socket from the Dialplan is:
<ip>:<port> [<keywords>]
The following are examples of how to use it in the Dialplan:
<action application="socket" data="127.0.0.1:8084"/> <action application="socket" data="127.0.0.1:8084 async"/> <action application="socket" data="127.0.0.1:8084 full"/> <action application="socket" data="127.0.0.1:8084 async...