Advanced programming

Hello, I’m trying for a while to get something done with asterisk, but no idea exactly where to start. I hope someone can help me a bit?

I read this forum a lot, but i can’t find the right solution what i need. I know, that there are companies who i must pay for advanced programming… but its fun to do the most by my own (when it works…)

I already make this:

exten => open,1,Set(CALLFILENAME=${CALLERID(num)}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-inkomend)
exten => open,n,Monitor(wav,${CALLFILENAME},m)
exten => open,n,Dial(SIP/555,15)
exten => open,n,GotoIf($["${DIALSTATUS}"=“NOANSWER”]?poging2)
exten => open,n,Hangup
exten => open,n(poging2),Playback(bericht5)
exten => open,n,Playtones(425/1000,0/4000)
exten => open,n,Wait(25)
exten => open,n,Dial(SIP/555,20)
exten => open,n,GotoIf($["${DIALSTATUS}"=“NOANSWER”]?einde)
exten => open,n,Hangup
exten => open,n(einde),Playback(bericht6)
exten => open,n,Playtones(congestion)
exten => open,n,Wait(10)
exten => open,n,Hangup

BUT i need something more advanced. I need a way that people don’t hung up the phone, and call again and that the phone rings again. I must do this i think with a database. I can make a database, but what kind of commands must i use, to send the same caller to the same message what he already got before he hung up

i hope someone can help me with this…