How to have the original caller when pick up

Hi all,

i’ll try to explain my best.

lets says Alice is calling Bob.

Charlie picks up Bob call (something like pichupchan(pjsip\bob)

No problem with Bob who is the exten
No problem with Charlie who is the callerid(num)

But how to retrieve Alice ? who is she ?

Thanks for your help

Alice needs to set a channel variable with _ prefixes, so that it inherits to Bob. Charlie can then import that variable from Bob.

Many thanks David, this is a great idea !

When alice calls we are doing a think like set(_whocalls_bob=alice)
Then when picking up bob we can retrieve this variable.
But, how to build this variable ?

We have a variable called currentUser that is set to Bob, right
i’d like to have a variable that is whocalls${currentuser} to set it to alice and then read it after
I though i was autorised to do that but it seems there is a syntax error as reading it with ${whocalls${currentuser}} gaves me void

In fact : how to build a variable whose name is buolt with variable ?

Thanks !

Edit : well, our problem is before that…
To be sure, we tried with only one variable for testing purpose.
This variable is called “whocalls”.

We set it before dial using set(_whocalls=alice)
then under pickup diaplan we are unable to recall it, either using ${whocalls} either ${_whocalls}
We also tried with double _

I guess we missed something on how to address global variables

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_IMPORT

Thanks,
i guess that will be more easy using global variables or database :slight_smile:

Thanks a lot

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.