[asterisk-users] received wrong state events for originate command

Sun xiaoshuang xiaoshuangsun at gmail.com
Fri Nov 28 21:02:43 CST 2008


Hey all,

      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("127.0.0.1","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");

fclose($socket);

Best regards,

Xiaoshuang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081129/d3746b26/attachment.htm 


More information about the asterisk-users mailing list