[Freeswitch-dev] Event Socket issue.
hai.lei at mapleworks.com
Wed Aug 19 14:00:16 PDT 2009
I am using Freeswitch to do some development work and encounter a problem
with Event Socket.
The configuration is: Freeswitch works as PBX. I also configure three
softphones A, B and C.
What I want is:
1. A call B.
2. B reject the call.
3. Freeswitch start conference involve A, B and C.
What I did was:
1. Add perl script to the dialplan, so the perl script will be called after
B reject the call from A. Worked fine.
2. In the script, I connected to localhost:8021 so the Freeswitch work in
Inbound mode. Worked fine.
3. Then run $connection->execute to run "conference_set_auto_outcall" and
"conference" command. Not worked.
So I check the "parse_command" function in file "mod_event_socket.c", the
following is what happened:
Since I give the uuid to "$connection->execute" command, so FS doesn't care
if it is Async mode or not. Actually FS just call
function "switch_core_session_queue_private_event" to queue the event. Here
is the problem, since B already reject the
call, then nobody will call the function "switch_ivr_parse_event" to execute
I did try to add code to "parse_command" function to treat the Async and
Sync mode differently when the uuid is provided. The
conference was started successfully in Sync mode but since the "conference"
application is blocked, my perl script was not able
to move on since it was waiting for the "conference" to stop. If I choose
"$connection->executeAsync", the commands were not
run because of the reason I mentioned above.
What is the proper solution for this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev