I have eavesdrop working fine on outbound calls and also inbound calls where there is a single DID per IP phone. When I have a DID that rings multiple extensions simultaneously, what is the best way to obtain information about which extension has picked up the call and store that using hash? I can set a variable before I issue the bridge action, like so: <action application="hash" data="insert/${domain_name}-spymap/646xxxyyyy-1000/${uuid}"/> <action application="bridge" data="user/1001@${domain_name},user/1002@${domain_name},user/1003@${domain_name},user/1004@${domain_name}"/> However, that doesn't tell me who actually picked up, so at best I can allow users to eavesdrop on the last incoming call to the main DID, not the last incoming call to a particular extension. Is there something I can do in the bridge that will cause it to set a variable once it knows which extension has picked up the call?
maybe api_on_answer var? On Wed, Jan 20, 2010 at 10:48 AM, Wellie Chao <wchao@yahoo.com> wrote:
I have eavesdrop working fine on outbound calls and also inbound calls where there is a single DID per IP phone. When I have a DID that rings multiple extensions simultaneously, what is the best way to obtain information about which extension has picked up the call and store that using hash? I can set a variable before I issue the bridge action, like so:
<action application="hash" data="insert/${domain_name}-spymap/646xxxyyyy-1000/${uuid}"/> <action application="bridge" data="user/1001@${domain_name},user/1002@ ${domain_name},user/1003@${domain_name},user/1004@${domain_name}"/>
However, that doesn't tell me who actually picked up, so at best I can allow users to eavesdrop on the last incoming call to the main DID, not the last incoming call to a particular extension. Is there something I can do in the bridge that will cause it to set a variable once it knows which extension has picked up the call?
_______________________________________________ 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 http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
Thanks. Your answer helped me find execute_on_answer, which worked for me. Using execute_on_answer, I was able to get it to work exactly as I wanted, but I had to hardcode the variable per bridge target. I am wondering if there's a better way to handle it. Here is what I have now (which works): <action application="bridge" data="[execute_on_answer='hash insert/${domain_name}-spymap/646xxxyyyy-1000/${uuid}']user/1001@${domain_name},[execute_on_answer='hash insert/${domain_name}-spymap/646xxxyyyy-1001/${uuid}']user/1002@${domain_name},[execute_on_answer='hash insert/${domain_name}-spymap/646xxxyyyy-1002/${uuid}']user/1003@${domain_name},[execute_on_answer='hash insert/${domain_name}-spymap/646xxxyyyy-1003/${uuid}']user/1004@${domain_name}"/> What I am wondering is whether there's a way to do it like this instead: <action application="export" data="execute_on_answer='hash insert/${domain_name}-spymap/646xxxyyyy-${answered_username}/${uuid}'"/> <action application="bridge" data="user/1001@${domain_name},user/1002@${domain_name},user/1003@${domain_name},user/1004@${domain_name}"/> So, the two questions are: [1] How would I get the username of the bridge target that picks up the call? [2] Is there a way to defer variable substitution/evaluation until after the call is answered? Date: Wed, 20 Jan 2010 14:09:48 -0600 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Eavesdrop when using simring maybe api_on_answer var? On Wed, Jan 20, 2010 at 10:48 AM, Wellie Chao <wchao@yahoo.com> wrote: I have eavesdrop working fine on outbound calls and also inbound calls where there is a single DID per IP phone. When I have a DID that rings multiple extensions simultaneously, what is the best way to obtain information about which extension has picked up the call and store that using hash? I can set a variable before I issue the bridge action, like so: <action application="hash" data="insert/${domain_name}-spymap/646xxxyyyy-1000/${uuid}"/> <action application="bridge" data="user/1001@${domain_name},user/1002@${domain_name},user/1003@${domain_name},user/1004@${domain_name}"/> However, that doesn't tell me who actually picked up, so at best I can allow users to eavesdrop on the last incoming call to the main DID, not the last incoming call to a particular extension. Is there something I can do in the bridge that will cause it to set a variable once it knows which extension has picked up the call? _______________________________________________ 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 http://www.freeswitch.org -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (2)
-
Anthony Minessale
-
Wellie Chao