'How to originate a call in FreeSWITCH using C++ application
I am new in FreeSWITCH library. I have explored library at certain level. I have tried originate command to initiate call using fs_cli and also received events using ESL.
My end goal is: Originate a call from my C++ application. Once callee answered to the call, send RTP packages to the respective user(IP:PORT)
How can I originate a call from my C++ application?
Any help is greatly appreciated !
Solution 1:[1]
From fs_cli, you should learn from official example first: https://freeswitch.org/confluence/display/FREESWITCH/Originate+Example
After you find suitable api command from fs_cli, you can connect and send same api command to FS from C++ by "event socket": https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket
Solution 2:[2]
You should initiate a sip invite via your app. (You can use a sip library such as https://www.pjsip.org) When the call gets answered (sip ok response) you transmit the RTP.
On the Freeswitch side you configure your destinations accordingly
Using ESL will not allow you to playback remote file. So you are better off sending over as standard sip invite
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Lin Yu Cheng |
Solution 2 | Len |