[asterisk-users] Call Return
A J Stiles
asterisk_list at earthshod.co.uk
Thu Jul 9 03:02:45 CDT 2015
On Wednesday 08 Jul 2015, Andrew Colin wrote:
> Hi Guys
>
>
>
> I am trying to write a macro for a call return so for example
>
> Anyone in the company transfers a call to another extension and it is not
> answered etc it must return to the person who did the transfer
>
> I have got it working but if the call originates externally for example
> someone calls in to the switchboard and they transfer it then it tries to
> return to the outside caller.
>
> As doing a return to ${EXTEN}) wont work as that is the external party.
>
> How do I declare a variable from the extension dialed?
> So for example when 200 dials 201 I can capture the calling party(in this
> case 200) and declare it as a variable?
You need to set a variable quite early in your extension logic, using a Set
command;
Set(dialled=${EXTEN})
and then later you can retrieve it as ${dialled} . This variable will persist
across context jumps, even although ${EXTEN} may have changed.
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
More information about the asterisk-users
mailing list