I have this problem making outbound call. Maybe someone can help me with this.
I'm have a service in C (TCP Server), where i receive all calls.
<extension name="outcalls">
<condition>
<action application="hangup"/>
</condition>
</extension>
In this service I do all the work of billing and control of active calls.
This is my commands, where i receive a connection to make a call to 1001
sendmsg execute\n
call-command: set\n
execute-app-name: dialed_extension=1001\n\n
sendmsg execute\n
call-command: export\n
execute-app-name: dialed_extension=1001
sendmsg execute\n
call-command: set\n
execute-app-name: bypass_media=true\n\n
sendmsg execute\n
call-command: set\n
execute-app-name: call_timeout=30\n\n
sendmsg execute\n
call-command: set\n
execute-app-name: hangup_after_bridge=true\n\n
sendmsg execute\n
call-command: set\n
execute-app-name: continue_on_fail=true\n\n
sendmsg execute\n
call-command: bridge\n
execute-app-name: user/${dialed_extension}@${domain_name}\n\n
But now I stopped because I can not cancel the bridge and do something with the call.
I tried, but all commands i have sended like
sendmsg execute\n
call-command: hangup\n
execute-app-name: CHANNEL_UNACCEPTABLE\n\n
or
sendmsg execute\n
call-command: break\n\n
Do nothing with the call
I receive only this in FS log
[DEBUG] switch_core_session.c:1151 Send signal sofia/internal/1001@192.168.211.69[BREAK]
I tried with and without "event-lock: true"
I need to do this such as: credit is over, I need to cancel the current bridge and play a sound to the user and hangup call
or to simple hangup a call