[Freeswitch-users] Setting effective_caller_id_name before putting a user in a callcenter queue has no effect
Markus Lindenberg
markus.lindenberg at gmail.com
Wed Mar 21 15:37:32 MSK 2012
Hi,
my dialplan goes like this:
<action application="export" data="effective_caller_id_name=HOTLINE
${caller_id_name}"/>
<action application="callcenter" data="hotline@${domain_name}"/>
Setting/exporting effective_caller_id_name has no effect when the call
is presented to a callback agent. the original callerid and
calleridname will be used.
for now i worked around the problem like this:
<extension name="hotline">
<condition field="destination_number" expression="^42$">
<action application="export"
data="effective_caller_id_name=HOTLINE ${caller_id_name}"/>
<action application="bridge" data="loopback/hotline_queue"/>
</condition>
</extension>
<extension name="hotline_queue">
<condition field="destination_number" expression="^hotline_queue$">
<action application="callcenter" data="hotline@${domain_name}"/>
</condition>
</extension>
while this works, it just doesn't look right to me and means i have to
take additional actions if i want the dialplan to continue after
bridging into the queue.
To me the obvious solution would be to have mod_callcenter.c (line
2479 "INSERT INTO members...") check for origination/effective caller
id variables and use them, if available.
I'm already doing this kind of check over and over in some lua code i
call before bridging (e.g. for sending xmpp notifications):
cidnum = session:getVariable("effective_caller_id_number")
if not cidnum then
cidnum = session:getVariable ("origination_caller_id_number")
end
if not cidnum then
cidnum = session:getVariable ("caller_id_number")
end
This doesn't feel entirely right either. Shouldn't there be a command
that always gives me the computed callerid after possible
manipulations? or should i generally do this stuff in the b leg, where
the effective_caller_id_name is available as caller_id_name?
Thanks,
Markus
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list