[Freeswitch-users] How to insert hash for b-leg?
Garey Arrington
gareyarrington at yahoo.com
Fri Jul 19 06:22:01 MSD 2013
I'd like to devise a way to insert a hash for a scenario like this...
1. Receive inbound call from PSTN to IVR, caller enters an extension number or option leading to an extension or callgroup
2. Insert hash for the receiving extension or group with the domain_name of the receiving extension or group. (alternatively, is there a way to modify the eavesdrop config to accomplish the same thing?)
I tried this but I have a different domain_name for calls from my carrier than for calls within a context/location (multitenant config).
<extension name="postroute_global" continue="true">
<condition>
<action application="hash" data="insert/${domain_name}-spymap/${caller_id_number}/${uuid}"/>
<action application="hash" data="insert/${domain_name}-spymap/${destination_number}/${uuid}"/>
<action application="hash" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/>
<action application="hash" data="insert/${domain_name}-last_dial/global/${uuid}"/>
<action application="set" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
</condition>
</extension>
Eavesdrop extension config:
<extension name="main_number_47" continue="true">
<condition field="destination_number" expression="^125(.+)$">
<action application="answer"/>
<action application="eavesdrop" data="${hash(select/${domain_name}-spymap/$1)}"/>
</condition>
</extension>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130718/9cf6a8b2/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list