[asterisk-users] What's up with the Manager Interface?!?!
Douglas Garstang
dgarstang at oneeighty.com
Wed Nov 29 12:25:55 MST 2006
> -----Original Message-----
> From: Michael Collins [mailto:mcollins at fcnetwork.com]
> Sent: Wednesday, November 29, 2006 11:20 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: RE: [asterisk-users] What's up with the Manager Interface?!?!
>
>
> > Sometimes the data comes back separated by \r\n, and sometimes it's
> > separated by \n.
> > The whole thing is completely inconsistent, and trying to write any
> kind
> > of API for it is -GHASTLY-
>
> Doug,
>
> What language(s) are you using? Just curious. I've been
> tinkering with
> Perl, POE, and POE::Component::Client::Asterisk::Manager. These have
> abstracted away the lowest level of programming.
>
> I know you've done Python in the past - I hear that there's a
> module for
> AMI called py-Asterisk. Have you seen or tried that? Ditto
> with Ruby -
> a module called RAMI. Both are on sourceforge.
>
> Also, could you hum a few bars about what you're trying to accomplish
> with your API? I'm curious about the big picture.
Michael, I'm using python.
Here's a good example. I'm trying to get SIP blf. I managed to split my result into a list of lines by splitting on ANY of \r\n, \n or \r. I was going use the column headings from the third line as my keys for my dictionary/hash, rather than hard coding them. Notice anything? The 'Call ID' column has a space right in the middle which means I can't simply split this up by white-space.
Response: Follows
Privilege: Command
Peer User Call ID Extension Last state Type
xxx.187.128.105 2944090 f7ee98da-6d 2944006 InUse xpidf+xml
xxx.187.128.105 2944090 111e388b-6b 2944077 Idle xpidf+xml
I think I looked at the python module and was underwhelmed by it.
Doug.
More information about the asterisk-users
mailing list