Wednesday, November 28, 2007

Re: [asterisk-users] retrieve last number dialled

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

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users

No comments: