Hi, all
I’d like to configure Asterisk to receiving call from PSTN. After PSTN phone call in, Asterisk will prompt it enter a number, then Asterisk will
transfer the call to a SIP phone by this number.
Please help me check the following extensions, is that OK? thanks!
[from_pstn]
exten => _.,1,Answer()
exten => _.,2,Playback(privacy-prompt)
exten => _.,3,GoTo(Xfer,s,1)
[Xfer]
exten => s,1, Playback(beep)
exten => _.,1,Dial(SIP/${EXTEN}@$(OutboundProxy))
Can I use the $(EXTEN) to refer the number that entered after prompt?
If not, how can I cope with it? thanks!
I think you’d be better off setting a timeout and using Background() rather than Playback(). Check:
voip-info.org/tiki-index.php … n+commands
I don’t think Playback() accepts dialing, but Background() definitely does.
Apart from that, it looks reasonably viable to me.
Thanks for answer.
I still doubt that whether $(EXTEN) can refer to the numbers that entered after prompt?
Anyone can confirm me? Thanks!
extension changes as following:
[from_pstn]
exten => _.,1,Answer()
exten => _.,2,GoTo(Xfer,s,1)
[Xfer]
exten => s,1,Background(privacy-prompt)
exten => _.,1,Dial(SIP/${EXTEN}@$(OutboundProxy), 30)
Any suggestion?
I am really not sure that whether $(EXTEN) can refer to the numbers that entered after prompt?
Thanks!
Mate, why don’t you read the information on the Background() command from the page that’s linked to from that URL i gave you? If you read it, you’d know the answer!