Hello,
Right now I´m using callback to my cellphone and DISA (incrediblepi-3.11) without problems.
To make this more comfortably I tried to set up a calltrough solution without using DTMF / DISA.
To evoke the callback call I use a trunking number that can be extended by 2 digits (XX). Asterisk can strip this last two digits in the (in incrediblepi-3.11 already pre-configured) context "from-pstn-toheader":
exten => _X.,1,Goto(from-test,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
and then create a new extension ("from-test") to dial out with a second trunk using an additional prefix "**7" (this second trunk is my landline ATA with speed dial function).
After I got the callback call on my cellphone the asterisk should start dial "**7XX". So the handmade DISA-dialing of "**7XX" wouldn´t be necessary.
My extensions_custom.conf:
[from-test]
exten => _trunkingnumberXX,1,Set(OWN=cellphonenumber)
exten => _trunkingnumberXX,2,Set(calltrough=${EXTEN:-2})
exten => _trunkingnumberXX,3,GotoIf($["${CALLERID(num)}" = "${OWN}"]?yes:no)
exten => _trunkingnumberXX,100(yes),NoOp("cellphonecalling")
exten =>_trunkingnumberXX,101,Dial(SIP/**7${calltrough}@secondtrunk)
exten => _trunkingnumberXX,200(no),NoOp("notme")
Without callback this works perfect (inbound route destination set to "secondtrunk"; incoming context is set to "context=from-pstn-toheader"): if dialing trunkingnumberXX from outside the asterisk calls directly **7XX using the second trunk.
But I have no idea (after a couple of weeks...) how to combine this with callback. As a rookie I don´t know where to place this code in the dialplan...
Any help or advice is most welcome!
Kind regards
Dr. Kupka
Right now I´m using callback to my cellphone and DISA (incrediblepi-3.11) without problems.
To make this more comfortably I tried to set up a calltrough solution without using DTMF / DISA.
To evoke the callback call I use a trunking number that can be extended by 2 digits (XX). Asterisk can strip this last two digits in the (in incrediblepi-3.11 already pre-configured) context "from-pstn-toheader":
exten => _X.,1,Goto(from-test,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
and then create a new extension ("from-test") to dial out with a second trunk using an additional prefix "**7" (this second trunk is my landline ATA with speed dial function).
After I got the callback call on my cellphone the asterisk should start dial "**7XX". So the handmade DISA-dialing of "**7XX" wouldn´t be necessary.
My extensions_custom.conf:
[from-test]
exten => _trunkingnumberXX,1,Set(OWN=cellphonenumber)
exten => _trunkingnumberXX,2,Set(calltrough=${EXTEN:-2})
exten => _trunkingnumberXX,3,GotoIf($["${CALLERID(num)}" = "${OWN}"]?yes:no)
exten => _trunkingnumberXX,100(yes),NoOp("cellphonecalling")
exten =>_trunkingnumberXX,101,Dial(SIP/**7${calltrough}@secondtrunk)
exten => _trunkingnumberXX,200(no),NoOp("notme")
Without callback this works perfect (inbound route destination set to "secondtrunk"; incoming context is set to "context=from-pstn-toheader"): if dialing trunkingnumberXX from outside the asterisk calls directly **7XX using the second trunk.
But I have no idea (after a couple of weeks...) how to combine this with callback. As a rookie I don´t know where to place this code in the dialplan...
Any help or advice is most welcome!
Kind regards
Dr. Kupka
