[asterisk-users] ${CALLERID(num)} after doing transfer from extension to extension

A J Stiles asterisk_list at earthshod.co.uk
Mon Oct 24 04:40:26 CDT 2011


On Monday 24 October 2011, bilal ghayyad wrote:
> If the incoming call (via PSTN) reached for an extension (which is the
> reception), and then the extension transferred the call to the proper
> person, and we need to do recording for the call at this proper person,
> the problem that at this point the ${CALLERID(num)} will represnt the
> reception guy extension and not the original caller id of the caller who
> called from outside via the PSTN. How can I get this original caller id?

As soon as the incoming call lands in a context, store the caller's number in 
a variable; for instance,
Set(ORIG_NUM=${CALLERID(num)})
and then when building up the call filename, just use ${ORIG_NUM} instead of 
=${CALLERID(num)}


-- 
AJS

Answers come *after* questions.



More information about the asterisk-users mailing list