Problem in dialing extension

hello,

i have write a simple AGI script which supose to dial a extension

this is the my sip.conf file

[surinder]
type=friend
regexten=1222
username=surinder
secret=1234
host=dynamic
context=tut

this s my extension.comf

[tut]

exten => 1222,1,agi(testagi.agi)

this s my AGi script which i written in C

#include<stdio.h>
main()

{
char *res;

   res = run_command("EXEC Dial SIP/1222");
          if (!res) {
            fprintf(stderr, "Failed to execute

command\n");
return -1;
}

   return 0;

}

static char *run_command(char *command)
{
fprintf(stdout, ā€œ%s\nā€, command);
return wait_result();
}

can anyone help me tat

wer im doing wrong plzzzzzzzz

What went wrong, plzzzzzzzz? :unamused: