package org.asteriskjava.fastagi.command;

public class DialCommand extends AbstractAgiCommand
{
    /**
     * Serial version identifier.
     */
    private static final long serialVersionUID = 3762248656229053753L;
    private String options;
    private String target;
    private int timeout;

    /**
     * Creates a new AnswerCommand.
     */
    public DialCommand(String target, int timeout, String options)
    {
        super();
        this.target = target;
        this.timeout = timeout;
        this.options = options;
    }

    @Override
    public String buildCommand()
    {
        String command = "EXEC " + escapeAndQuote("dial") + " " + escapeAndQuote(target) + ","
                + escapeAndQuote("" + timeout);
        if (options != null && options.length() > 0)
        {
            command += "," + escapeAndQuote(options);
        }
        //This should be in a log
        System.out.println(command);

        return command;

    }
}

@@ -36,16 +36,92 @@
 mmand;%0A%0A
+import org.asteriskjava.util.Log;%0Aimport org.asteriskjava.util.LogFactory;%0A%0A
 public c
@@ -366,16 +366,78 @@
 timeout;
+%0A    private final Log logger = LogFactory.getLog(getClass());
 %0A%0A    /*
@@ -996,24 +996,25 @@
       %7D%0A
+%0A
         
 //This s
@@ -1009,60 +1009,19 @@
     
-//This should be in a log%0A        System.out.println
+logger.info
 (com

change system.out to logger