bilal ghayyad
2011-Oct-24 09:19 UTC
[asterisk-users] ${CALLERID(num)} after doing transfer from extension to extension
Hi All; As I am using the ${CALLERID(num)} to be part of the filename that I am recording it, I am facing the following problem: 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? Regards Bilal
Sammy Govind
2011-Oct-24 09:21 UTC
[asterisk-users] ${CALLERID(num)} after doing transfer from extension to extension
Set CDR(destination) or whichever field you need to get recorded in CDRs to get your desired stats. On Mon, Oct 24, 2011 at 2:19 PM, bilal ghayyad <bilmar_gh at yahoo.com> wrote:> Hi All; > > As I am using the ${CALLERID(num)} to be part of the filename that I am > recording it, I am facing the following problem: > > 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? > > Regards > Bilal > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111024/9d232413/attachment.htm>
A J Stiles
2011-Oct-24 09:40 UTC
[asterisk-users] ${CALLERID(num)} after doing transfer from extension to extension
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.