I?ve been trying to build up an application which receives an outside call, process some options in an agi script and puts this call as a parkcall listening music on hold. At this time to verify the transaction the system generates an outside call to the phone # typed on one of the options of the agi script mentioned before. Once the phone # dialled verifies with a pin code the transaction is finished and hungs up the generated outside call and then returns the error code to the parked call so the received outside call could check if it was successful or not.
I sort of make the following contexts in the extensions.conf. For this example I was doing them with internal calls (received and generated calls).
The result is that nothing happens
include => parkedcalls
exten => 111,1,Answer ;
exten => 111,2,Goto(pago,s,1)
exten => s,1,Background(Welcome)
exten => s,2,AGI <archive with options asking for a phone # to dial>
exten => s,3,Wait(2)
exten => s,4,Goto(parkedcalls,100,1)
exten => s,5,Playback(Accept or Denied)
exten => s,6,Playback(Goodbye)
exten => s,7,Hangup
exten => 100,1,Answer
exten => 100,2,SetMusicOnHold(default)
exten => 100,3,AGI <archive asking for the phone # dialled for a pin number>|pinnumber,s,5)
exten => 100,4,Playback(Accept or Denied)
exten => 100,5,Playback(Goodbye)
exten => 100,6,Hangup
parkext => 100
parkpos => 101-300
context => parkedcalls
#parkingtime => 60
I don?t know if it is correct to use the parkcall functionality. Please let me know if I?m in the right way or not.
Thanks for your help.