Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Hangup and wait for connection after dialed extension is busy.


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
freeswitch at femur.pl
Guest





PostPosted: Wed Oct 20, 2021 8:49 am    Post subject: [Freeswitch-users] Hangup and wait for connection after dial Reply with quote

Hello!

Imagine the situation.

I call internal extension. It is busy. So I press *0 and hangup. When
leg B finishes its connection, freeswitch calls us both and bridges.

How do I get such functionality? I will be grateful for any suggestion.


--
fe

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
mayamatakeshi at gmail...
Guest





PostPosted: Wed Oct 20, 2021 8:08 pm    Post subject: [Freeswitch-users] Hangup and wait for connection after dial Reply with quote

On Wed, Oct 20, 2021 at 11:14 PM Paweł Femur Wojtal <freeswitch@femur.pl (freeswitch@femur.pl)> wrote:

Quote:

Hello!

Imagine the situation.

I call internal extension. It is busy. So I press *0 and hangup. When
leg B finishes its connection, freeswitch calls us both and bridges.

How do I get such functionality? I will be grateful for any suggestion.


Maybe someone knows an easier way but if I needed something like this, I would try:
  - send the call to a lua script after the bridge fails due to BUSY (channel variable last_bridge_hangup_cause==USER_BUSY)
  - ask the user to confirm if he/she wants to get a callback
  - if yes, find the UUID of the extension call. This could be obtained from channel variables (probably originate_signal_bond or originated_legs) if not, I would use Freeswitch.dbh (https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference) to search for the extension that is busy.
  - set a hangup hook to be execute when the extension call terminates (https://freeswitch.org/confluence/display/FREESWITCH/api_hangup_hook)
  - the hook would be a lua script that would make the callback to you and after answer try to call the extension.


obs: 
  - if the hangup hook fails to be set, it could be because the call ended while we were doing the processing so I would execute the callback right away).
  - in the callback, before calling the extension I would ask for confirmation again as by that time you might not want to call the extension anymore
Back to top
mayamatakeshi at gmail...
Guest





PostPosted: Thu Oct 21, 2021 5:45 am    Post subject: [Freeswitch-users] Hangup and wait for connection after dial Reply with quote

On Thu, Oct 21, 2021 at 10:03 AM mayamatakeshi <mayamatakeshi@gmail.com (mayamatakeshi@gmail.com)> wrote:

Quote:



On Wed, Oct 20, 2021 at 11:14 PM Paweł Femur Wojtal <freeswitch@femur.pl (freeswitch@femur.pl)> wrote:

Quote:

Hello!

Imagine the situation.

I call internal extension. It is busy. So I press *0 and hangup. When
leg B finishes its connection, freeswitch calls us both and bridges.

How do I get such functionality? I will be grateful for any suggestion.


Maybe someone knows an easier way but if I needed something like this, I would try:
  - send the call to a lua script after the bridge fails due to BUSY (channel variable last_bridge_hangup_cause==USER_BUSY)
  - ask the user to confirm if he/she wants to get a callback
  - if yes, find the UUID of the extension call. This could be obtained from channel variables (probably originate_signal_bond or originated_legs) if not, I would use Freeswitch.dbh (https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference) to search for the extension that is busy.




Sorry, actually, you cannot use the channel variables to find the UUID as they would be for the Leg B you just attempted. You need to find the UUID of the active call that is making the extension B busy.
So you need to use freeswitch.dbh.
 
Quote:
  - set a hangup hook to be execute when the extension call terminates (https://freeswitch.org/confluence/display/FREESWITCH/api_hangup_hook)
  - the hook would be a lua script that would make the callback to you and after answer try to call the extension.


obs: 
  - if the hangup hook fails to be set, it could be because the call ended while we were doing the processing so I would execute the callback right away).
  - in the callback, before calling the extension I would ask for confirmation again as by that time you might not want to call the extension anymore






Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services