Sorry for the late reply,
the dial plan looks like this, ivr style for a private survey,
[survey]
exten => s,1,Answer()
exten => s,n,Goto(extensions,s,1)
exten => s,n,Hangup()
As a side note, i put S for incoming and I for outgoing, otherwise it would call and just hung up before the start of the survey. I found that this exten is working OK for incoming and outgoing.
[extensions]
exten => s,1,Answer() ; Answer the line
exten => s,n,Background(ivr/choice_1)
exten => s,n,WaitExten()
exten => i,1,Background(ivr/choice_1)
same => n,WaitExten()
exten => t,1,Set(TIMEOUT(digit)=10) ; Set Digit Timeout to 5 seconds
exten => t,2,Set(TIMEOUT(response)=20) ; Set Response Timeout to 10 seconds
exten => t,3,Hangup()
exten => 1,1,Goto(right,s,1)
exten => 2,1,Goto(wrong,s,2)
For the incoming call, it reads the customer number very well, but when the outgoing starts, it reads the number i`m calling from, and not the number i dialed. I need the numbers dialed to be displayed so i know what numbers and email took the survey.
This is just a demo IVR . I can`t find the extension that reads the number dialed.
[right]
exten => s,1,Playback(ivr/welcome)
exten => s,n,NoOp(First we start by getting the phone number)
exten => s,n,Set(phone=${CALLERID(num)})
exten => s,n,NoOp(7 digits code that received by email for registration)
exten => s,n,Read(emailpin,ivr/emailpin,3,7)
exten => s,n,GotoIf($[LEN(${emailpin}) != 4]?59:13)
exten => s,n,NoOp(4 digits code)
exten => s,n,Read(promopin,ivr/promopin,3,7)
exten => s,n,GotoIf($[LEN(${promopin}) != 4]?69:16)
…and so on.