[asterisk-users] retrieve last number dialled
Yehavi Bourvine +972-8-9489444
YEHAVI at VMS.HUJI.AC.IL
Wed Nov 28 06:10:00 CST 2007
> What is the easiest (simplest) way to do this?
I do it in two steps: Save the dialled number in Asterisk DB and have a
special extension (*41) which redials it.
Here is the abstract from the dialplan where I save it:
Set(_To=${EXTEN}); // Save the original extension dialled.
Set(_From=${CALLERID(num)}); // Save the caller.
Set(DB(${To}/LastCaller)=${From});
Set(DB(${From}/LastCalled)=${To});
and then the special extension:
*41 => {
Set(tmp=${DB(${CALLERID(num)}/LastCalled)});
SayDigits(${tmp});
// Save it so when the other side hangs it will see it and dial us.
Dial(SIP/${tmp});
};
Regards, __Yehavi:
More information about the asterisk-users
mailing list