About AMI originate command

Something is wrong when i use originate command to call my phone
(Asterisk1.4.22 + xp100 card).
Actually, i have two problems.
The first one: If i fire a outgoing call using originate command directly,
after my pc startup, i will receive below error message:
[Nov 26 07:58:53] NOTICE[6559]: channel.c:2898 __ast_request_and_dial:
Unable to request channel Zap/1/13xxxxxxxxx

but i can call the FXO using my phone, everything seems perfect! After the
incomming call, i fire outgoing call using originate again, it works now, my
phone can ring, i also can pick up it(I seems originate did not create a new
Zap channel,just used an exsiting channel?).

But the second problem produced, i received the Dialing, UP, Newexten events
before my phone ringing. It is supposed that i send an originate command
(like Dial application), the last state should be Dialing… until i pick up
my phone or timeout.

These problems only for Zap channel, if i fire a outgoing call to SIP
channel, it works well.
What wrong with me ?

Here is my php script:
$socket = fsockopen(“”,“5038”,$errno,$errstr,$timeout);
fputs($socket,“Action: Login\r\n”);
fputs($socket,“Username: tester\r\n”);
fputs($socket,“Secret: test\r\n\r\n”);

fputs($socket,“Action: Originate\r\n”);
fputs($socket,“Channel: Zap/1/13XXXXXXXX\r\n”);
fputs($socket,“Context: callme\r\n”);
fputs($socket,“Exten: s\r\n”);
fputs($socket,“Priority: 1\r\n\r\n”);


Best regards,