[Asterisk-Users] Re: manager interface behavior

2005-11-23 Thread Bill Michaelson




snacktime wrote:
On 11/23/05, Bill Michaelson [EMAIL PROTECTED] wrote:


   I'm working on a manager client that I designed to hold open TCP
 connection to asterisk while it is running for varoius purposes.  After
 being puzzled by unexpected behavior, I realized that the server closes
 the connection after it completes an "originate" action - or at least it
 does in the case of my test transactions.

 I solicit opinions: is this a feature or a bug?
  


I've never seen that behavior and I've written several clients for the
manager api.  I guess it's possible that a particular combination of
variables in the request could trigger an error that makes asterisk do
that.   I would try issuing the same originate by telneting in
manually and see what happens.  That way you can positively rule out
your client being the one that's disconnecting.


to which I reply:

That's the first thing I did, and it confirmed the behavior (see
below). To be precise, the disconnect occurs after the Newchannel
report. So I infer that you think it is inappropriate. I've recoded
the client so that it immediately reconnects. Anybody actually tried
this? I can imagine that the developer might have assumed that such a
request would likely come from a transient client, and that it would be
helpful to terminate the connection. But if so, I don't think it's the
right decision. Maybe it's just an oversight. Any other opinions?
I'm too lazy to read the server side code.

[EMAIL PROTECTED]:~ telnet hack.cosi.com 5038
Trying 192.168.10.26...
Connected to hack.cosi.com.
Escape character is '^]'.
Asterisk Call Manager/1.0
action: login
username: bill
secret: dontell

Response: Success
Message: Authentication accepted

action: originate
callerid: 00
context: default
priority: 1
exten: 212
channel: Local/762

Response: Success
Message: Originate successfully queued

Event: Newchannel
Privilege: call,all
Channel: Local/[EMAIL PROTECTED],2
State: Ring
CallerID: unknown
CallerIDName: unknown
Uniqueid: 1132773921.72

Connection closed by foreign host.
[EMAIL PROTECTED]:~ 


___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] Re: manager interface behavior

2005-11-23 Thread snacktime
On 11/23/05, Bill Michaelson [EMAIL PROTECTED] wrote:
  snacktime wrote:

 On 11/23/05, Bill Michaelson [EMAIL PROTECTED] wrote:


   I'm working on a manager client that I designed to hold open TCP
  connection to asterisk while it is running for varoius purposes. After
  being puzzled by unexpected behavior, I realized that the server closes
  the connection after it completes an originate action - or at least it
  does in the case of my test transactions.
 
  I solicit opinions: is this a feature or a bug?

  I've never seen that behavior and I've written several clients for the
 manager api. I guess it's possible that a particular combination of
 variables in the request could trigger an error that makes asterisk do
 that. I would try issuing the same originate by telneting in
 manually and see what happens. That way you can positively rule out
 your client being the one that's disconnecting.


  to which I reply:

  That's the first thing I did, and it confirmed the behavior (see below).
 To be precise, the disconnect occurs after the Newchannel report.  So I
 infer that you think it is inappropriate.  I've recoded the client so that
 it immediately reconnects.  Anybody actually tried this?  I can imagine that
 the developer might have assumed that such a request would likely come from
 a transient client, and that it would be helpful to terminate the
 connection.  But if so, I don't think it's the right decision.  Maybe it's
 just an oversight.  Any other opinions?  I'm too lazy to read the server
 side code.


Anything to see in the debug logs when you did the originate?  I'd
probably file this as a bug.  I've never had the originate command
make the server drop the connection like that, and I've never heard
anywhere that it would be normal behavior.

Chris
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Re: manager interface behavior

2005-11-23 Thread Mark Edwards
Title: Message



Are 
you also implementing the "ping" keepalive as part of your 
app?

Mark

  
  -Original Message-From: Bill Michaelson 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, 24 November 2005 9:09 
  AMTo: asterisk-users@lists.digium.comSubject: 
  [Asterisk-Users] Re: manager interface behaviorsnacktime 
  wrote:On 11/23/05, Bill Michaelson [EMAIL PROTECTED] wrote:

   I'm working on a manager client that I designed to hold open TCP
 connection to asterisk while it is running for varoius purposes.  After
 being puzzled by unexpected behavior, I realized that the server closes
 the connection after it completes an "originate" action - or at least it
 does in the case of my test transactions.

 I solicit opinions: is this a feature or a bug?
  
I've never seen that behavior and I've written several clients for the
manager api.  I guess it's possible that a particular combination of
variables in the request could trigger an error that makes asterisk do
that.   I would try issuing the same originate by telneting in
manually and see what happens.  That way you can positively rule out
your client being the one that's disconnecting.

to which I reply:That's the first thing I did, and it confirmed 
  the behavior (see below). To be precise, the disconnect occurs after the 
  Newchannel report. So I infer that you think it is inappropriate. 
  I've recoded the client so that it immediately reconnects. Anybody 
  actually tried this? I can imagine that the developer might have assumed 
  that such a request would likely come from a transient client, and that it 
  would be helpful to terminate the connection. But if so, I don't think 
  it's the right decision. Maybe it's just an oversight. Any other 
  opinions? I'm too lazy to read the server side 
  code.[EMAIL PROTECTED]:~ telnet hack.cosi.com 5038Trying 
  192.168.10.26...Connected to hack.cosi.com.Escape character is 
  '^]'.Asterisk Call Manager/1.0action: loginusername: 
  billsecret: dontellResponse: SuccessMessage: Authentication 
  acceptedaction: originatecallerid: 00context: 
  defaultpriority: 1exten: 212channel: Local/762Response: 
  SuccessMessage: Originate successfully queuedEvent: 
  NewchannelPrivilege: call,allChannel: 
  Local/[EMAIL PROTECTED],2State: RingCallerID: 
  unknownCallerIDName: unknownUniqueid: 
  1132773921.72Connection closed by foreign host.[EMAIL PROTECTED]:~ 
  
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users