Setting effective_caller_id_name before putting a user in a callcenter queue has no effect
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
I'v just noticed that this exact problem was mentioned a few days ago. Sorry for starting another thread. Still, this doesn't look right to me either. I assumed caller_id_name is considered read only? What's best practice here? On Fri, Mar 9, 2012 at 14:58, Mike <motosota@gmail.com> wrote:
In case it's of use to anyone else:
Thanks to the guys on the IRC - the solution to this is to set the caller_id_name variable in the dialplan before calling the callcenter application thuswise:
<action application="set" data="caller_id_name=Wookie"/> <action application="callcenter" data="support@default"/>
This works a treat.
The other methods we tried - using effective_caller_id_name or orignination_caller_id_name with either export, set or bridge_export didn't work.
Mike
On Wed, Mar 21, 2012 at 13:37, Markus Lindenberg <markus.lindenberg@gmail.com> wrote:
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
participants (1)
-
Markus Lindenberg