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

2011-10-24 Thread bilal ghayyad
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


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

2011-10-24 Thread Sammy Govind
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...@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

--
_
-- 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

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

2011-10-24 Thread A J Stiles
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.

--
_
-- 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