Difficulty configuring database extensions

Hello, first sorry for my english.

I am using asterisk RealTime and I am trying to use macro inside the database and I am not getting it. I’m trying to simulate this structure:

[interno]
exten => 8001,1,Goto(realuraativa,s,1)

[realuraativa]
exten => s,1,Set(numtries=0)
exten => s,2,Answer()
exten => s,n,NoOp(“Entrou na REALURA”)
exten => s,n,Background(/var/lib/asterisk/sounds/personalizados/audio1)
exten => s,n,WaitExten(2)

exten => i,1,Background(/var/lib/asterisk/sounds/personalizados/opcaoinvalida)
exten => i,n,Goto(realuraativa,s,1)

exten => t,1,Set(numtries=[{numtries} + 1])
exten => t,n,GotoIf([{numtries}=3]?naonao:simsim)
exten => t,n(simsim),Background(/var/lib/asterisk/sounds/personalizados/opcaoinvalida)
exten => t,n,Goto(realuraativa,s,2)
exten => t,n(naonao),Hangup()

exten => 1,1,Background(/var/lib/asterisk/sounds/personalizados/aguardetransf)
exten => 1,n,Dial(SIP/1002,60,tT)

exten => 2,1,Background(/var/lib/asterisk/sounds/personalizados/ligareinovamente)
exten => 2,n,Hangup()

exten => 3,1,Goto(realuraativa,s,2)

In the database is like this, but I’m not succeeding:
INSERT INTO extensions VALUES (2, ‘mycontext’, ‘8001’, ‘1’, ‘Goto’, ‘ura,s,1’);

INSERT INTO extensions VALUES (3, ‘mycontext’, ‘s’, ‘1’, ‘Set’, ‘numtries=0’);
INSERT INTO extensions VALUES (4, ‘mycontext’, ‘s’, ‘2’, ‘Answer’, ‘’);
INSERT INTO extensions VALUES (5, ‘mycontext’, ‘s’, ‘3’, ‘NoOp’, ‘“Entrou na URAAtiva”’);
INSERT INTO extensions VALUES (6, ‘mycontext’, ‘s’, ‘4’, ‘Background’, ‘/var/lib/asterisk/sounds/personalizados/audio1’);
INSERT INTO extensions VALUES (7, ‘mycontext’, ‘s’, ‘5’, ‘WaitExten’, ‘2’);

My table:
CREATE TABLE extensions (
id serial,
context varchar(40) NOT NULL default ‘’,
exten varchar(40) NOT NULL default ‘’,
priority varchar(40) NOT NULL default ‘’,
app varchar(40) NOT NULL default ‘’,
appdata varchar(256) NOT NULL default ‘’,
PRIMARY KEY (context,exten,priority),
UNIQUE (id)
);

Thanks.