Stefan Gofferje
2014-Jun-03 09:31 UTC
[asterisk-users] Get last dialed number in a context?
Hi, I would like to implement an auto-redial function in a context. The idea is about like this: Dial a number Hear busy Hangup Pick up again Dial a code like *123 => jumps into a context which redials until callresult is not busy Maybe like this: [autoredial] exten => s,1,Set(number=${CHANNEL(lastdialed)}) exten => s,2,Dial(SIP/${number}@account,60,g) exten => s,3,Wait(15) exten => s,4,GotoIf( [ "${DIALSTATUS}" = "BUSY" ]?2) exten => s,5,Hangup For that I'd need to somewhere get the last dialed number from the channel/line I'm initiating the call from. Is something like this already implemented? -S -- (o_ Stefan Gofferje | SCLT, MCP, CCSA //\ Reg'd Linux User #247167 | VCP #2263 V_/_ Heckler & Koch - the original point and click interface -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4079 bytes Desc: S/MIME Cryptographic Signature URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140603/9d537fcd/attachment.bin>
Israel Gottlieb
2014-Jun-03 09:44 UTC
[asterisk-users] Get last dialed number in a context?
you could save the info in astdb for the last call per extension and then pull it from there On Tue, Jun 3, 2014 at 12:31 PM, Stefan Gofferje <lists at home.gofferje.net> wrote:> Hi, > > I would like to implement an auto-redial function in a context. The idea > is about like this: > > Dial a number > Hear busy > Hangup > Pick up again > Dial a code like *123 > => jumps into a context which redials until callresult is not busy > > Maybe like this: > > [autoredial] > exten => s,1,Set(number=${CHANNEL(lastdialed)}) > exten => s,2,Dial(SIP/${number}@account,60,g) > exten => s,3,Wait(15) > exten => s,4,GotoIf( [ "${DIALSTATUS}" = "BUSY" ]?2) > exten => s,5,Hangup > > For that I'd need to somewhere get the last dialed number from the > channel/line I'm initiating the call from. Is something like this > already implemented? > > -S > > -- > (o_ Stefan Gofferje | SCLT, MCP, CCSA > //\ Reg'd Linux User #247167 | VCP #2263 > V_/_ Heckler & Koch - the original point and click interface > > > > -- > _____________________________________________________________________ > -- 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140603/a96823dd/attachment.html>
Patrick Laimbock
2014-Jun-03 10:53 UTC
[asterisk-users] Get last dialed number in a context?
On 03-06-14 11:31, Stefan Gofferje wrote:> Hi, > > I would like to implement an auto-redial function in a context. The idea > is about like this: > > Dial a number > Hear busy > Hangup > Pick up again > Dial a code like *123 > => jumps into a context which redials until callresult is not busy > > Maybe like this: > > [autoredial] > exten => s,1,Set(number=${CHANNEL(lastdialed)}) > exten => s,2,Dial(SIP/${number}@account,60,g) > exten => s,3,Wait(15) > exten => s,4,GotoIf( [ "${DIALSTATUS}" = "BUSY" ]?2) > exten => s,5,Hangup > > For that I'd need to somewhere get the last dialed number from the > channel/line I'm initiating the call from. Is something like this > already implemented?Have you looked at Call Completion Supplementary Services (CCSS)? https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=5243096 Cheers, Patrick
This is a typical phone feature, but it should be easy to implement this at the pbx level using "originate" and call files. Actually, I have a robust wakeup call module for hotels that could be used for this. If you need a fast solution you could contact me. jg