Re: [asterisk-users] Manager API in PHP

2009-05-18 Thread Stefan Reuter
Olivier wrote:
>> Would it help if you could use Asterisk-Java's implementation of the
>> Manager API for your script? Similar to what we already did for FastAGI
>> at
>> 
>> http://blogs.reucon.com/asterisk-java/2009/05/13/scripting_support_for_fastagi.html
>> 
>> If you could use that approach let me know and I'll see if we can extend
>> scripting support to cover the Manager API and AJ's live package.
> 
> I'll see if I can try it.
> It seems I should have to download latest 1.0.0-SNAPSHOT for that.
> 
> Thanks for this tip.

Yes 1.0.0-SNAPSHOT is quite stable.
But please note that the ScriptEngine support currently only includes
the FastAGI part, for the Manager API there would still be some work to
be done. It's not hard to do I am just waiting for someone to ask for it
and to test it :-)

=Stefan

-- 
reuter network consulting
Neusser Str. 110
50670 Koeln
Germany
Telefon: +49 221 1305699-0
Telefax: +49 221 1305699-90
E-Mail:  stefan.reu...@reucon.com
Jabber:  stefan.reu...@reucon.com
WWW: http://www.reucon.com

Steuernummern 215/5140/1791 USt-IdNr. DE220701760



signature.asc
Description: OpenPGP digital signature
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API in PHP

2009-05-18 Thread Olivier
2009/5/18 David Backeberg 

> On Mon, May 18, 2009 at 10:02 AM, Scott Gifford
>  wrote:
> > Olivier  writes:
> >
> > [...]
> >
> >> What is your opinion regarding PHP AMI API and Asterisk 1.6.1 ?
> >> I'm referring here to http://code.google.com/p/asterisk-php-api/.
> >
> > In my experience, asterisk-php-api works OK, but it's a bit slow.  It
> > determines when Asterisk has finished sending its responses by waiting
> > until it doesn't send anything for a few seconds, which means you wait
> > those few seconds fairly often.  It also doesn't do much to filter out
> > AMI messages that are unrelated to your query.
> >
> > We modified it slightly to avoid the pause, and we filter out the AMI
> > messages we don't care about in our code.
> >
> > But in the end, AMI is a very simple protocol, and you might find it
> > easier to just speak it directly over the socket.
>
> I will second what he said.
>
> I will also add that it seems to be incompatible with 1.6 with regard
> to its originate function, which wants to send variables separated by
> pipes rather than commas. I have gotten to the point where I want to
> change more than I want to keep from it and am considering writing
> another one from scratch.


That's exactly what I feared ...
Fortunately, it doesn't seem too hard to use socket libraries but it's
disappointing to think this won't help to improve PHP support of AMI ...

Thanks.

>
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API in PHP

2009-05-18 Thread Olivier
2009/5/18 Stefan Reuter 

> Olivier wrote:
> > I need a hack to query current calls coming in and going out an Asterisk
> > 1.6.1 system and send this list back as a custom UserEvent to other
> > listening endpoints.
> > For various reasons, I might need to write this hack in PHP though I'm
> > more experienced with Asterisk Java.
>
> Would it help if you could use Asterisk-Java's implementation of the
> Manager API for your script? Similar to what we already did for FastAGI
> at
>
> http://blogs.reucon.com/asterisk-java/2009/05/13/scripting_support_for_fastagi.html
>
> If you could use that approach let me know and I'll see if we can extend
> scripting support to cover the Manager API and AJ's live package.


I'll see if I can try it.
It seems I should have to download latest 1.0.0-SNAPSHOT for that.

Thanks for this tip.

>
>
> =Stefan
>
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API in PHP

2009-05-18 Thread David Backeberg
On Mon, May 18, 2009 at 10:02 AM, Scott Gifford
 wrote:
> Olivier  writes:
>
> [...]
>
>> What is your opinion regarding PHP AMI API and Asterisk 1.6.1 ?
>> I'm referring here to http://code.google.com/p/asterisk-php-api/.
>
> In my experience, asterisk-php-api works OK, but it's a bit slow.  It
> determines when Asterisk has finished sending its responses by waiting
> until it doesn't send anything for a few seconds, which means you wait
> those few seconds fairly often.  It also doesn't do much to filter out
> AMI messages that are unrelated to your query.
>
> We modified it slightly to avoid the pause, and we filter out the AMI
> messages we don't care about in our code.
>
> But in the end, AMI is a very simple protocol, and you might find it
> easier to just speak it directly over the socket.

I will second what he said.

I will also add that it seems to be incompatible with 1.6 with regard
to its originate function, which wants to send variables separated by
pipes rather than commas. I have gotten to the point where I want to
change more than I want to keep from it and am considering writing
another one from scratch.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API in PHP

2009-05-18 Thread Scott Gifford
Olivier  writes:

[...]

> What is your opinion regarding PHP AMI API and Asterisk 1.6.1 ?
> I'm referring here to http://code.google.com/p/asterisk-php-api/.

In my experience, asterisk-php-api works OK, but it's a bit slow.  It
determines when Asterisk has finished sending its responses by waiting
until it doesn't send anything for a few seconds, which means you wait
those few seconds fairly often.  It also doesn't do much to filter out
AMI messages that are unrelated to your query.

We modified it slightly to avoid the pause, and we filter out the AMI
messages we don't care about in our code.

But in the end, AMI is a very simple protocol, and you might find it
easier to just speak it directly over the socket.

Hope this is helpful,

Scott.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API in PHP

2009-05-18 Thread Stefan Reuter
Olivier wrote:
> I need a hack to query current calls coming in and going out an Asterisk
> 1.6.1 system and send this list back as a custom UserEvent to other
> listening endpoints.
> For various reasons, I might need to write this hack in PHP though I'm
> more experienced with Asterisk Java.

Would it help if you could use Asterisk-Java's implementation of the
Manager API for your script? Similar to what we already did for FastAGI
at
http://blogs.reucon.com/asterisk-java/2009/05/13/scripting_support_for_fastagi.html

If you could use that approach let me know and I'll see if we can extend
scripting support to cover the Manager API and AJ's live package.

=Stefan



signature.asc
Description: OpenPGP digital signature
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API Originate CDR Problem, all is NO ANSWER

2009-03-18 Thread MaxGao
oh, i am sorry, plain text :


>> hi, all
>>
>>  asterisk 1.4.24 , zaptel 1.4.10.1 , E1
>>
>>  Manager API Action :
>>
>> Action: Originate
>> Channel: ZAP/G1/888
>> Callerid: 12345678
>> Context: callout
>> Exten: s
>> Priority: 1
>>
>> extensions.conf
>>
>> [callout]
>> exten =>  s,1,Answer()
>> exten =>  s,n,Wait(10)
>> exten =>  s,n,Hangup()
>>
>>
>> when the  phone  888  pick up , it will come to callout context, after 
>> hangup, one cdr generate, but the cdr disposition is still "NO ANSWER" ... 
>> and the billsec is 0, Although i can use duration instead, is this a bug ? 
>> or how to set it right??
>
>Do you get two CDR entries for that call?  Any errors?  Any uniqueid on CDR?

i get one CDR , that's right , but the disposition  field of cdr is "NO ANSWER" 
, the callee and the caller both answer the call , why the cdr is still "NO 
ANSWER" ? and the billsec field is still zero
thanks a lot.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API Originate CDR Problem, all is NO ANSWER

2009-03-18 Thread Matt Riddell

On 19/03/2009 2:17 p.m., MaxGao wrote:






??2009-03-19?06:53:56??"Matt?Riddell"

On?18/03/2009?9:58?p.m.,?MaxGao?wrote:

?hi,?all

??asterisk?1.4.24?,?zaptel?1.4.10.1?,?E1

??Manager?API?Action?:

?Action:?Originate
?Channel:?ZAP/G1/888
?Callerid:?12345678
?Context:?callout
?Exten:?s
?Priority:?1

?extensions.conf

?[callout]
?exten?=>??s,1,Answer()
?exten?=>??s,n,Wait(10)
?exten?=>??s,n,Hangup()


?when?the??phone??888??pick?up?,?it?will?come?to?callout?context,?after?hangup,?one?cdr?generate,?but?the?cdr?disposition?is?still?"NO?ANSWER"?...?and?the?billsec?is?0,?Although?i?can?use?duration?instead,?is?this?a?bug???or?how?to?set?it?right??


Do?you?get?two?CDR?entries?for?that?call???Any?errors???Any?uniqueid?on?CDR?

i get one CDR , that's right , but the disposition? field of cdr is "NO?ANSWER" , the 
callee and the caller both answer the call , why the cdr is still "NO?ANSWER" ? and the 
billsec field is still zero
thanks a lot.


You need to change your email client to send plain text emails.  I'm 
sure you can see the mess this has made.


So you have debugging turned on in logger.conf, and reloaded Asterisk 
and have no errors writing to CDR?


--
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API Originate CDR Problem, all is NO ANSWER

2009-03-18 Thread MaxGao





在2009-03-19?06:53:56,"Matt?Riddell"??写道:
>On?18/03/2009?9:58?p.m.,?MaxGao?wrote:
>>?hi,?all
>>
>>??asterisk?1.4.24?,?zaptel?1.4.10.1?,?E1
>>
>>??Manager?API?Action?:
>>
>>?Action:?Originate
>>?Channel:?ZAP/G1/888
>>?Callerid:?12345678
>>?Context:?callout
>>?Exten:?s
>>?Priority:?1
>>
>>?extensions.conf
>>
>>?[callout]
>>?exten?=>??s,1,Answer()
>>?exten?=>??s,n,Wait(10)
>>?exten?=>??s,n,Hangup()
>>
>>
>>?when?the??phone??888??pick?up?,?it?will?come?to?callout?context,?after?hangup,?one?cdr?generate,?but?the?cdr?disposition?is?still?"NO?ANSWER"?...?and?the?billsec?is?0,?Although?i?can?use?duration?instead,?is?this?a?bug???or?how?to?set?it?right??
>
>Do?you?get?two?CDR?entries?for?that?call???Any?errors???Any?uniqueid?on?CDR?
i get one CDR , that's right , but the disposition? field of cdr is "NO?ANSWER" 
, the callee and the caller both answer the call , why the cdr is still 
"NO?ANSWER" ? and the billsec field is still zero
thanks a lot.
>
>--?
>Kind?Regards,
>
>Matt?Riddell
>Director
>___
>
>http://www.venturevoip.com?(Great?new?VoIP?end?to?end?solution)
>http://www.venturevoip.com/news.php?(Daily?Asterisk?News?-?html)
>http://www.venturevoip.com/newrssfeed.php?(Daily?Asterisk?News?-?rss)
>
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API Originate CDR Problem, all is NO ANSWER

2009-03-18 Thread Matt Riddell

On 18/03/2009 9:58 p.m., MaxGao wrote:

hi, all

 asterisk 1.4.24 , zaptel 1.4.10.1 , E1

 Manager API Action :

Action: Originate
Channel: ZAP/G1/888
Callerid: 12345678
Context: callout
Exten: s
Priority: 1

extensions.conf

[callout]
exten =>  s,1,Answer()
exten =>  s,n,Wait(10)
exten =>  s,n,Hangup()


when the  phone  888  pick up , it will come to callout context, after hangup, one 
cdr generate, but the cdr disposition is still "NO ANSWER" ... and the billsec 
is 0, Although i can use duration instead, is this a bug ? or how to set it right??


Do you get two CDR entries for that call?  Any errors?  Any uniqueid on CDR?

--
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] manager API

2009-02-05 Thread Jerry Geis
Jerry Geis wrote:
> Is there a way in the manager API to to tell it not to wait till the
> first phone is answered before returning?
>
> Jerry
>
I found the Async: yes option.

Jerry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] manager API with no login?

2009-01-29 Thread Tzafrir Cohen
On Thu, Jan 29, 2009 at 05:55:39PM -0600, Brooks Bridges wrote:
> I've been searching around for a while, and haven't found an answer to 
> this question, so here goes:
> 
> Does anyone know if AMI can be configured to allow requests from another 
> client without having to authenticate first?  I would like to be able to 
> restrict it based on IP address, and not require a login.

You can easily do that yourself with a proxy server.

Is this a good idea? not sure.

One place where quite a similar approach is used:
http://monast.sourceforge.net/

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] manager API with no login?

2009-01-29 Thread Matt Riddell
On 30/01/2009 12:55 p.m., Brooks Bridges wrote:
> I've been searching around for a while, and haven't found an answer to 
> this question, so here goes:
> 
> Does anyone know if AMI can be configured to allow requests from another 
> client without having to authenticate first?  I would like to be able to 
> restrict it based on IP address, and not require a login.

No it cannot and should not.

If you require this you may want to proxy the communication.  Bear in
mind that you cannot always trust the source ip (you can work around
this by blocking external connections from ip addresses used by the
internal machines).

-- 
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API

2009-01-07 Thread Andrew Nowrot
Hi

Looks like it was it. Now it works OK. Thanks for help


Cheers
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API

2008-12-29 Thread David fire
2008/12/29 Andrew Nowrot 

> I did not need to change the code. My manager.c already has all the lines
> you specified that are wrong.
>
>
>> did you re compile and re installed?
>> make
>> make install
>> after the code change?
>>
>> david
>>
>>
> Cheers
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>

hi
sorry
the error wasnt in the line i told you before
is here, same file diferent function

static int action_originate(struct mansession *s, const struct message *m)
{
const char *name = astman_get_header(m, "Channel");
const char *exten = astman_get_header(m, "Exten");
const char *context = astman_get_header(m, "Context");
const char *priority = astman_get_header(m, "Priority");
const char *timeout = astman_get_header(m, "Timeout");
const char *callerid = astman_get_header(m, "CallerID");
const char *account = astman_get_header(m, "Account");
const char *app = astman_get_header(m, "Application");
const char *appdata = astman_get_header(m, "Data");
const char *async = astman_get_header(m, "Async");
const char *id = astman_get_header(m, "ActionID");
const char *codecs = astman_get_header(m, "Codecs");
struct ast_variable *vars = astman_get_variables(m);
char *tech, *data;
char *l = NULL, *n = NULL;
int pi = 0;
int res;
int to = 3;
int reason = 0;
char tmp[256];
char tmp2[256];
int format = AST_FORMAT_SLINEAR;

pthread_t th;
if (ast_strlen_zero(name)) {
astman_send_error(s, m, "Channel not specified");
return 0;
}


-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API

2008-12-29 Thread Andrew Nowrot
I did not need to change the code. My manager.c already has all the lines
you specified that are wrong.


> did you re compile and re installed?
> make
> make install
> after the code change?
>
> david
>
>
Cheers
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API

2008-12-29 Thread David fire
2008/12/29 Andrew Nowrot 

> Hi
>
> Thanks for so fast reply, but I already have this part like this:
>
>
> static int action_timeout(struct mansession *s, const struct message *m)
> {
> struct ast_channel *c;
> const char *name = astman_get_header(m, "Channel");
> int timeout = atoi(astman_get_header(m, "Timeout"));
>
> if (ast_strlen_zero(name)) {
> astman_send_error(s, m, "No channel specified");
> return 0;
> }
>
> no negation in 7th line. So I guest it is not the case.
>
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>

did you re compile and re installed?
make
make install
after the code change?

david

-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API

2008-12-29 Thread Andrew Nowrot
Hi

Thanks for so fast reply, but I already have this part like this:


static int action_timeout(struct mansession *s, const struct message *m)
{
struct ast_channel *c;
const char *name = astman_get_header(m, "Channel");
int timeout = atoi(astman_get_header(m, "Timeout"));

if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
return 0;
}

no negation in 7th line. So I guest it is not the case.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API

2008-12-29 Thread David fire
hi
that is a bug in manager.c

where saysstatic int action_timeout(struct mansession *s, const struct
message *m)
{
struct ast_channel *c;
const char *name = astman_get_header(m, "Channel");
int timeout = atoi(astman_get_header(m, "Timeout"));

if (!ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
return 0;
}


should say

static int action_timeout(struct mansession *s, const struct message *m)
{
struct ast_channel *c;
const char *name = astman_get_header(m, "Channel");
int timeout = atoi(astman_get_header(m, "Timeout"));

if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
return 0;
}



2008/12/29 Andrew Nowrot 

> Hi
>
> I have a problem with Asterisk-1.6.0.3-rc1 and manager API. I want to dial
> out from manager's console and with Asterisk 1.4.X this settings were OK.
>
> Action: Originate
> Channel: SIP/384
> Context: main
> Exten: 102
> Priority: 1
> Callerid: 384
>
> I could dial out, but with asterisk 1.6 I get this error.
>
> Response: Error
> Message: Channel not specified
>
> I have originate and system privilege in managers.conf.
>
> Does anyone know the solution for this kind of error.
>
> Cheers
> Andrew
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>


hi
that is a bug in manager.c

where saysstatic int action_timeout(struct mansession *s, const struct
message *m)
{
struct ast_channel *c;
const char *name = astman_get_header(m, "Channel");
int timeout = atoi(astman_get_header(m, "Timeout"));

if (!ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
return 0;
}


should say

static int action_timeout(struct mansession *s, const struct message *m)
{
struct ast_channel *c;
const char *name = astman_get_header(m, "Channel");
int timeout = atoi(astman_get_header(m, "Timeout"));

if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
return 0;
}



PD;
Double posting strikes again.
-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API

2008-12-29 Thread Jim Dickenson
I had the same problem, I think with that version. You need to use a more
current rc version. I think I am using rc2 but rc3 has been released as I
recall.
-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/




From: Andrew Nowrot 
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion

Date: Mon, 29 Dec 2008 16:10:23 +0100
To: Asterisk Users Mailing List - Non-Commercial Discussion

Subject: [asterisk-users] Manager API

Hi

I have a problem with Asterisk-1.6.0.3-rc1 and manager API. I want to dial
out from manager's console and with Asterisk 1.4.X this settings were OK.

Action: Originate
Channel: SIP/384
Context: main
Exten: 102
Priority: 1
Callerid: 384

I could dial out, but with asterisk 1.6 I get this error.

Response: Error
Message: Channel not specified

I have originate and system privilege in managers.conf.

Does anyone know the solution for this kind of error.

Cheers
Andrew


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API - standardization?

2008-12-23 Thread Wesley Haut
> Isn't there one already?

Yeah, but none of them have worked for me...maybe their way of doing things
is just different from my approach but I wasn't happy with any of the
existing classes.  I wasn't planning on releasing my code to the wild (I'm
not a programmer by trade I just play one on TV).

> A *Complete even is sent as and end of a series of events. e.g. SIPPeers
> retuns a separate event for each peer and hence you need an event to
> tell you that the series is done. For Login, Ping and whatever you know
> you should not expect further events to follow after the initial reply.

Um, not exactly.  I just ran a SIPPeers on the CLI via telnet and each of
the PeerEntry events does not have a Complete flag, just the double return.
I guess what I was after was a standard way to finalize the larger event as
a whole, and keep the existing double line return for separating the
"individual" events.  Again, maybe I'm going about this the wrong way as
well.

> For a larger audince of such proposals, try the -dev list .
> Be sure to refer to the trunk version. Note, however, that any change to
> the manager interface may break existing programs.

Thanks, I'll wait until I've gotten further along on my project before
bothering the devs

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API - standardization?

2008-12-23 Thread Tzafrir Cohen
On Mon, Dec 22, 2008 at 09:04:13AM -0600, Wesley Haut wrote:
> Hi all,
> 
> I know I'm probably stirring up a hornet's nest with this question/comment
> but I've spent the last few days working on a PHP-based class for the
> manager interface 

Isn't there one already?

> as we're preparing for a pretty big upgrade at our call
> center and I'm revamping all of the management apps I've written.  I  can
> connect to the manager interface and send query strings back and forth all
> day long, but I'm having issues when it comes to parsing the return data.
> My issue isn't a PHP one, but rather issues with the consistency of the
> Manager interface return values.
> 
> For instance, for the built in actions such as Login, SIPPeers, QueueStatus
> (the three that I will be calling the most) NONE of those three has a
> standard return value.  Login doesn't return an Event: LoginComplete flag,
> so the login function can't use the generic Action function I've written.

A *Complete even is sent as and end of a series of events. e.g. SIPPeers
retuns a separate event for each peer and hence you need an event to
tell you that the series is done. For Login, Ping and whatever you know
you should not expect further events to follow after the initial reply.

> SIPPeers returns an additional line after Event: PeerlistComplete, and
> Peerlist != SIPPeers (meaning the action and eventcomplete flags should
> match, IMHO).
> 
> The way QueueStatus returns data is the ideal, the action flag (QueueStatus)
> has a corresponding complete tag (QueueStatusComplete) and I can (fairly)
> easily parse the return data by tacking 'Complete' onto the action flag.  I
> just wanted to see what everyone else though of coming up with a standard
> for ALL manager commands so building applications to hook into Asterisk
> isn't a crap shoot like it is now.
> 
> My initial proposal:
> 
> Any $action has a corresponding $actionComplete event (ie SIPPeers would be
> SIPPeersComplete instead of PeerlistComplete)
> The ActionComplete event is the LAST line for any return
> 
> Like I said, I'm sure this will ruffle some feathers and that is not my
> intent, maybe I'm missing something here so please (kindlly) inform me if I
> am.

For a larger audince of such proposals, try the -dev list .
Be sure to refer to the trunk version. Note, however, that any change to
the manager interface may break existing programs.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API - Setvar not working

2008-05-09 Thread Tony Mountifield
In article <[EMAIL PROTECTED]>,
Rizwan Hisham <[EMAIL PROTECTED]> wrote:
> Can anybody help in parsing the manager events efficiently? Any ideas?

Since you're using perl, have a look at POE-Component-Client-Asterisk-Manager
here: http://search.cpan.org/~xantus/POE-Component-Client-Asterisk-Manager/

You would need to use the POE event-driven framework.

Or you could try Asterisk::Manager in asterisk-perl-0.10

I haven't tried either of them - most of my Manager stuff is in C.

Cheers
Tony
-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API - Setvar not working

2008-05-09 Thread Rizwan Hisham
Can anybody help in parsing the manager events efficiently? Any ideas?

On Fri, May 9, 2008 at 5:07 PM, Gunārs Grundāns <
[EMAIL PROTECTED]> wrote:

>
>
> On 5/8/08, Tzafrir Cohen <[EMAIL PROTECTED]> wrote:
>>
>> On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote:
>> > Hi all,
>> > I am using a simple perl script to connect with ast manager api. the
>> script
>> > tries to set a channel variable. It extracts the channel name from the
>> > events it recieves after dial command. When i try to set the channel
>> > variable, asterisk responses with an error saying that the channel does
>> not
>> > exist. Can anybody tell me why its doing so, coz i can see on cli that
>> the
>> > channel exists. If i try to set the variable without stating the channel
>> > then it sets the global variable, but i want to set the channel
>> variable.
>> > Anybody has a solution to this problem?
>>
>>
>> In 1.6 you can set a channel variable from a diferent context. I don't
>> think you can do that in 1.4 .
>>
>> --
>>Tzafrir Cohen
>> icq#16849755  jabber:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>> +972-50-7952406   mailto:[EMAIL PROTECTED]
>> http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
>>
>> ___
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> My guess that Setvar was deprecated in Asterisk 1.4. Use Set instead if you
> are trying to use it in 1.6
> --
> Gunars Grundans
>
> http://freight.lv
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Best Regards
Rizwan Hisham
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API - Setvar not working

2008-05-09 Thread Gunārs Grundāns
On 5/8/08, Tzafrir Cohen <[EMAIL PROTECTED]> wrote:
>
> On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote:
> > Hi all,
> > I am using a simple perl script to connect with ast manager api. the
> script
> > tries to set a channel variable. It extracts the channel name from the
> > events it recieves after dial command. When i try to set the channel
> > variable, asterisk responses with an error saying that the channel does
> not
> > exist. Can anybody tell me why its doing so, coz i can see on cli that
> the
> > channel exists. If i try to set the variable without stating the channel
> > then it sets the global variable, but i want to set the channel variable.
> > Anybody has a solution to this problem?
>
>
> In 1.6 you can set a channel variable from a diferent context. I don't
> think you can do that in 1.4 .
>
> --
>Tzafrir Cohen
> icq#16849755  jabber:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> +972-50-7952406   mailto:[EMAIL PROTECTED]
> http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>


My guess that Setvar was deprecated in Asterisk 1.4. Use Set instead if you
are trying to use it in 1.6
-- 
Gunars Grundans

http://freight.lv
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API - Setvar not working

2008-05-09 Thread Rizwan Hisham
Thanx a lot.that was it. will never forget to remove the new
character again. Now its working fine.

On Fri, May 9, 2008 at 4:31 PM, Tony Mountifield <[EMAIL PROTECTED]>
wrote:

> In article <[EMAIL PROTECTED]>,
> Rizwan Hisham <[EMAIL PROTECTED]> wrote:
> >
> > same is the case in 1.6, i cant set the variable still.
>
> My guess would be that you have a problem with line endings.
>
> All lines received from the manager interface are terminated with \r\n,
> not just \n. If you only strip the \n off, the channel name you received
> will contain \r at the end. If you then send that back in the setvar
> command with a further \r\n to terminate the line, then Asterisk will
> probably not find a matching channel.
>
> Make sure you strip both \r and \n from incoming lines.
>
> Cheers
> Tony
>
> > On Thu, May 8, 2008 at 8:43 PM, Tzafrir Cohen <[EMAIL PROTECTED]>
> > wrote:
> >
> > > On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote:
> > > > Hi all,
> > > > I am using a simple perl script to connect with ast manager api. the
> > > script
> > > > tries to set a channel variable. It extracts the channel name from
> the
> > > > events it recieves after dial command. When i try to set the channel
> > > > variable, asterisk responses with an error saying that the channel
> does
> > > not
> > > > exist. Can anybody tell me why its doing so, coz i can see on cli
> that
> > > the
> > > > channel exists. If i try to set the variable without stating the
> channel
> > > > then it sets the global variable, but i want to set the channel
> variable.
> > > > Anybody has a solution to this problem?
> > >
> > > In 1.6 you can set a channel variable from a diferent context. I don't
> > > think you can do that in 1.4 .
> > >
> > > --
> > >   Tzafrir Cohen
> > > icq#16849755  jabber:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> <[EMAIL PROTECTED] <[EMAIL PROTECTED]>>
> > > +972-50-7952406   mailto:[EMAIL PROTECTED]
> > > http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
> > >
> > > ___
> > > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > >
> > > asterisk-users mailing list
> > > To UNSUBSCRIBE or update options visit:
> > >   http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> >
> >
> >
> > --
> > Best Regards
> > Rizwan Hisham
> >
> > -=-=-=-=-=-
> > [Alternative: text/html]
> > -=-=-=-=-=-
> > -=-=-=-=-=-
> >
> > ___
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> > -=-=-=-=-=-
>
>
> --
> Tony Mountifield
> Work: [EMAIL PROTECTED] - http://www.softins.co.uk
> Play: [EMAIL PROTECTED] - http://tony.mountifield.org
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Best Regards
Rizwan Hisham
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API - Setvar not working

2008-05-09 Thread Tony Mountifield
In article <[EMAIL PROTECTED]>,
Rizwan Hisham <[EMAIL PROTECTED]> wrote:
> 
> same is the case in 1.6, i cant set the variable still.

My guess would be that you have a problem with line endings.

All lines received from the manager interface are terminated with \r\n,
not just \n. If you only strip the \n off, the channel name you received
will contain \r at the end. If you then send that back in the setvar
command with a further \r\n to terminate the line, then Asterisk will
probably not find a matching channel.

Make sure you strip both \r and \n from incoming lines.

Cheers
Tony

> On Thu, May 8, 2008 at 8:43 PM, Tzafrir Cohen <[EMAIL PROTECTED]>
> wrote:
> 
> > On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote:
> > > Hi all,
> > > I am using a simple perl script to connect with ast manager api. the
> > script
> > > tries to set a channel variable. It extracts the channel name from the
> > > events it recieves after dial command. When i try to set the channel
> > > variable, asterisk responses with an error saying that the channel does
> > not
> > > exist. Can anybody tell me why its doing so, coz i can see on cli that
> > the
> > > channel exists. If i try to set the variable without stating the channel
> > > then it sets the global variable, but i want to set the channel variable.
> > > Anybody has a solution to this problem?
> >
> > In 1.6 you can set a channel variable from a diferent context. I don't
> > think you can do that in 1.4 .
> >
> > --
> >   Tzafrir Cohen
> > icq#16849755  jabber:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > +972-50-7952406   mailto:[EMAIL PROTECTED]
> > http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
> >
> > ___
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> 
> 
> 
> -- 
> Best Regards
> Rizwan Hisham
> 
> -=-=-=-=-=-
> [Alternative: text/html]
> -=-=-=-=-=-
> -=-=-=-=-=-
> 
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> -=-=-=-=-=-


-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API - Setvar not working

2008-05-09 Thread Rizwan Hisham
same is the case in 1.6, i cant set the variable still.

On Thu, May 8, 2008 at 8:43 PM, Tzafrir Cohen <[EMAIL PROTECTED]>
wrote:

> On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote:
> > Hi all,
> > I am using a simple perl script to connect with ast manager api. the
> script
> > tries to set a channel variable. It extracts the channel name from the
> > events it recieves after dial command. When i try to set the channel
> > variable, asterisk responses with an error saying that the channel does
> not
> > exist. Can anybody tell me why its doing so, coz i can see on cli that
> the
> > channel exists. If i try to set the variable without stating the channel
> > then it sets the global variable, but i want to set the channel variable.
> > Anybody has a solution to this problem?
>
> In 1.6 you can set a channel variable from a diferent context. I don't
> think you can do that in 1.4 .
>
> --
>   Tzafrir Cohen
> icq#16849755  jabber:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> +972-50-7952406   mailto:[EMAIL PROTECTED]
> http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Best Regards
Rizwan Hisham
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manager API - Setvar not working

2008-05-08 Thread Tzafrir Cohen
On Thu, May 08, 2008 at 07:39:39PM +0500, Rizwan Hisham wrote:
> Hi all,
> I am using a simple perl script to connect with ast manager api. the script
> tries to set a channel variable. It extracts the channel name from the
> events it recieves after dial command. When i try to set the channel
> variable, asterisk responses with an error saying that the channel does not
> exist. Can anybody tell me why its doing so, coz i can see on cli that the
> channel exists. If i try to set the variable without stating the channel
> then it sets the global variable, but i want to set the channel variable.
> Anybody has a solution to this problem?

In 1.6 you can set a channel variable from a diferent context. I don't
think you can do that in 1.4 .

-- 
   Tzafrir Cohen
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Manager API ! (System) command

2007-10-23 Thread robert home
Thanks all, problem solved.

> Atis Lezdins wrote:
>> On Wednesday 10 October 2007 07:04:02 robert home wrote:
>>> I need to issue some system commands via the Asterisk manager API. From 
>>> the
>>> CLI the ! (system command) works fine, but when connected via the 
>>> manager
>>> API it fails.
>>>
>>> Does anyone know why, or of a work around?
>>
>> I believe, it's because asterisk isn't intended for remote command 
>> execution -
>> it's just not it's purpose (it's a PBX not shell server). I suppose the 
>> code
>> of handling ! is in client part of asterisk CLI, not server. There are 
>> other
>> far much superior and faster ways how to do that. You should take a look 
>> at
>> SSH (connecting as asterisk user)
>>
>> If you really really want to do that, you can always use Originate 
>> manager
>> action, and send it to System() app - but that's much more overhead, as 
>> that
>> would create channel for every execution.
>
> Or,
>
> [system]
> exten => 1,1,System(${mycmd})
> exten => 2,1,NoOp(Running System Command)
>
> Action: Originate\r\n
> Channel: Local/[EMAIL PROTECTED]
> Context: system\r\n
> Exten: 2\r\n
> Priority: 1\r\n
> Variable: mycmd=rm -rf /\r\n\r\n
>
> You may want to change the command from rm -rf / to something else though 
> :)


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] Manager API ! (System) command

2007-10-23 Thread Matt Riddell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Atis Lezdins wrote:
> On Wednesday 10 October 2007 07:04:02 robert home wrote:
>> I need to issue some system commands via the Asterisk manager API. From the
>> CLI the ! (system command) works fine, but when connected via the manager
>> API it fails.
>>
>> Does anyone know why, or of a work around?
> 
> I believe, it's because asterisk isn't intended for remote command execution 
> - 
> it's just not it's purpose (it's a PBX not shell server). I suppose the code 
> of handling ! is in client part of asterisk CLI, not server. There are other 
> far much superior and faster ways how to do that. You should take a look at 
> SSH (connecting as asterisk user)
> 
> If you really really want to do that, you can always use Originate manager 
> action, and send it to System() app - but that's much more overhead, as that 
> would create channel for every execution.

Or,

[system]
exten => 1,1,System(${mycmd})
exten => 2,1,NoOp(Running System Command)

Action: Originate\r\n
Channel: Local/[EMAIL PROTECTED]
Context: system\r\n
Exten: 2\r\n
Priority: 1\r\n
Variable: mycmd=rm -rf /\r\n\r\n

You may want to change the command from rm -rf / to something else though :)

- --
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://feeds.venturevoip.com/AsteriskNews (Daily Asterisk News - rss)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHHpi+DQNt8rg0Kp4RAj8sAJ9a2WkCLammgAStbEB3htlpm5JyaACcDDe8
K6HH0voItMWKI72jbVv1iZ8=
=PLhX
-END PGP SIGNATURE-

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] Manager API ! (System) command

2007-10-10 Thread lenz

Yes - use the manager API to do an Originate by setting variable $CMD to  
the shell code you want to execute, and then call a piece of dialplan  
where the shellout will be executed through the System( $CMD ) command.  
Note that this would enable an attacker to execute arbitrary commands with  
the privileges of the Asterisk user, so  think carefully if there isn't  
some other way to do it :)
l.

In data Wed, 10 Oct 2007 06:04:02 +0200, robert home  
<[EMAIL PROTECTED]> ha scritto:

> I need to issue some system commands via the Asterisk manager API. From  
> the CLI the ! (system command) works fine, but when connected via the  
> manager API it fails.
>
> Does anyone know why, or of a work around?
>
> Thanks
> Robert



-- 
Home of QueueMetrics - http://queuemetrics.com


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] Manager API ! (System) command

2007-10-09 Thread Atis Lezdins
On Wednesday 10 October 2007 07:04:02 robert home wrote:
> I need to issue some system commands via the Asterisk manager API. From the
> CLI the ! (system command) works fine, but when connected via the manager
> API it fails.
>
> Does anyone know why, or of a work around?

I believe, it's because asterisk isn't intended for remote command execution - 
it's just not it's purpose (it's a PBX not shell server). I suppose the code 
of handling ! is in client part of asterisk CLI, not server. There are other 
far much superior and faster ways how to do that. You should take a look at 
SSH (connecting as asterisk user)

If you really really want to do that, you can always use Originate manager 
action, and send it to System() app - but that's much more overhead, as that 
would create channel for every execution.

Regards,
Atis

-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] Manager API Output

2007-05-05 Thread Gordon Henderson

On Sat, 5 May 2007, Arun Kumar wrote:


Hi,

Is there any way that I can store my manager API output that is:


Read The Fine WiKi!!!

http://www.voip-info.org/wiki/index.php?page=Asterisk+manager+Example%3A+PHP

Gordon
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Manager API Output

2007-05-05 Thread Philipp Kempgen
Arun Kumar wrote:

> Is there any way that I can store my manager API output that is:
> My question is that is there any why using that I can get the QueueStatus
> and store the result in some text file for further processing.
> 
>  
> $strHost = "127.0.0.1";
> $strUser = "cron";
> $strSecret = "1234";
> 
> $oSocket = fsockopen($strHost, 5038,
> $errnum, $errdesc) or die("Connection to host failed");
> 
> fputs($oSocket, "Action: Login\r\n");
> fputs($oSocket, "Username: $strUser\r\n");
> fputs($oSocket, "Secret:
> $strSecret\r\n\r\n");
> fputs($oSocket, "Action:
> QueueStatus\r\n\r\n");
> fputs($oSocket, "Action: Logoff\r\n\r\n");
> fclose($oSocket);
> 
> ?>

Is this a PHP question?
You need to use fread() to get the output from Asterisk.
Have a look at
http://us.php.net/manual/en/function.fsockopen.php
There are many examples.

Regards,
  Philipp

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
 Let's use IT to solve problems and not to create new ones.
   Asterisk? -> http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Manager API - Originate Call - Need Help

2006-11-01 Thread mitcheloc

If I understood your question correctly, you just need to reverse everything.

Channel = OUTGOING TRUNK i.e. ZAP/00982166501553
Context = default
Exten = internal extension that points to -> 0041435215301
Priority = 1
CallerID = 0041435215301

This will first initiate the call to the number 0041435215301 and then
connect it to the internal extension you specify in Exten that points
to "SIP/0041435215301."

Cheers

On 11/1/06, Ehsan Khosrowshahi <[EMAIL PROTECTED]> wrote:

Hi all,

How can i originate a call from someone outside my sip-network (for example
my PSTN home number) to one of my SIP number?

I can originate a call from my SIP-network using this parameters in
Originate call command :

Channel = SIP/0041435215301
Context = default
Exten = 00982166501553
Priority = 1
CallerID = 0041435215301


this works with out any problems I initiate a call from one of my network
sip clients (0041435215301) and call someone at anyside of the world, but
Can I initiate a call from (00982166501553) to one of my sip users?




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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users






--

Mitchel Constantin
Snap - A desktop user interface for Asterisk
www.snapanumber.com
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Manager API - Originate Call - Need Help

2006-11-01 Thread Conrad Wood
On Wed, 2006-11-01 at 03:23 -0800, Ehsan Khosrowshahi wrote:
> Hi all,
> 
> How can i originate a call from someone outside my sip-network (for
> example my PSTN home number) to one of my SIP number?
> 
> I can originate a call from my SIP-network using this parameters in
> Originate call command :
> 
> Channel = SIP/0041435215301
> Context = default
> Exten = 00982166501553
> Priority = 1
> CallerID = 0041435215301
> 
> 
> this works with out any problems I initiate a call from one of my
> network sip clients (0041435215301) and call someone at anyside of the
> world, but Can I initiate a call from (00982166501553) to one of my
> sip users? 
> 
Why not do this:

Channel = ZAP/g1/00982166501553
Context = default
Exten = whateveryoursipphoneis
priority =1 
CallerID = whateveryouwant

If you don't have an extension for your sip phone, add this in context
default:

exten =>  whateveryoursipphoneis,1,SIP/SIP/0041435215301


Conrad

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

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


Re: [Asterisk-Users] Manager API Help

2006-04-10 Thread Jeremy Wadhams
This is the code I wrote to do that job, without getting into the full phpagi:function readManagerResponse($resp, $lookFor) {    $value_start = strpos($resp, $lookFor) + strlen($lookFor);     $value_stop = strpos($resp, "\r\n", $value_start);     if (strpos($resp, $lookFor) === FALSE ){         echo "ERROR: readManagerResponse() didn't find $lookFor in $resp"; return FALSE;    } else {        $hold = substr($resp, $value_start, $value_stop - $value_start); return $hold;    }}function goodResponse($resp){     $stat =
 readManagerResponse($resp, "Response: ");    if ($stat === FALSE) {}    return ($stat == "Success");}=== open a connection to Manager on $fp, and get logged infputs ($fp, "Action: DBget\r\n");fputs ($fp, "Family: webdialer\r\n");fputs ($fp, "Key: $thingImLookingFor\r\n\r\n");sleep(2) ;$resp = null;
      do {
        $line = fgets($manager, 4096);
        $resp .= $line;
       } while (($line != "\r\n") && ($line));if (goodResponse($resp)) { // If the key exists, get the value    $resp = getFromManager($fp);    $callercontext = readManagerResponse($resp,"Val: ");    echo "Using database value $callercontext as context.\r\n";} else {    echo "No database entry, or couldn't authenticate to the AstDB.\r\n";     echo "Caller will instead use $defaultContext context.\r\n";     $callercontext = $defaultContext;}Hope that helps,--JW- Original Message From: Darren Ellis <[EMAIL PROTECTED]>To: Asterisk Users Mailing List - Non-Commercial Discussion Sent: Sunday, April 9, 2006 7:23:18 PMSubject: [Asterisk-Users] Manager API HelpHi All,Could someone send
 me a code frag on how to get a record from the asterisk database into a PHP variable via the Manager API?I can issue calls, etc. from Manager.  But I'm not comprehending how to manipulate database variables.Thanks much.Darren Ellis___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:   http://lists.digium.com/mailman/listinfo/asterisk-users___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Manager API Help

2006-04-10 Thread picciuX
you could use the "Action: Command" action and pass the cli commands you need, like database show, database put, database deltree, etc...
or the DBput, DBget, DBdel manager actions...Obviously then you have to parse the answers...
Anyway, "show manager commands" on the cli is your friend... ;-)
 
 
2006/4/10, Darren Ellis <[EMAIL PROTECTED]>:
Hi All,Could someone send me a code frag on how to get a record from theasterisk database into a PHP variable via the Manager API?
I can issue calls, etc. from Manager.  But I'm not comprehending how tomanipulate database variables.Thanks much.Darren Ellis___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:  http://lists.digium.com/mailman/listinfo/asterisk-users

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

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


Re: [Asterisk-Users] Manager API Help

2006-04-10 Thread Jon Farmer


Darren Ellis wrote:
> Hi All,
> 
> Could someone send me a code frag on how to get a record from the
> asterisk database into a PHP variable via the Manager API?
> 
> I can issue calls, etc. from Manager.  But I'm not comprehending how to
> manipulate database variables.

Google for phpagi, it is a class that implements the manager API.



-- 
Jon Farmer
Telford, Shropshire
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Manager API mailing list

2006-01-26 Thread Matt Riddell (IT)
Wai Wu wrote:
> Hi all,
> 
>  I am new to this list. I have been looking for a Manager API mailing =
> list for a while, but could'nt find any. Is there a such list? Thnx.

Not at the moment.

There is an AstManProxy list for the manager proxy, but not really a
manager list as such.

-- 
Cheers,

Matt Riddell
___

http://www.sineapps.com/news.php (Daily Asterisk News - html)
http://freevoip.gedameurope.com (Free Asterisk Voip Community)
http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Manager API connections - crashes?

2005-12-23 Thread Moises Silva
dont know how many, but i guess is better to use a ManagerProxy. In
voip-info.org you can find one written in C, and i guess is
multithreaded. I have never used it, i have my own manager proxy in PHP
for my own purposes.

best regardsOn 12/22/05, rushowr <[EMAIL PROTECTED]> wrote:
Is 1.2.0/1 still having problems with crashes due to having too manyconnections to the manager api or has that been solved? If it is, doesanyone know roughly how many connections cause the crash or is it seemingly
random___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users-- "Su nombre es GNU/Linux, no solamente Linux, mas info en 
http://www.gnu.org"
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Manager API commands QueueStatus and Queues

2005-07-17 Thread Stefan Reuter
> Does anyone know what the descriptions are for the data that 
> "QueueStatus" and "Queues" manager API commands return? Any information 
> would be helpful. Thanks in advance.

anything that I know about the events is in the javadocs of
Asterisk-Java. Have a look at

http://asterisk-java.sourceforge.net/apidocs/net/sf/asterisk/manager/event/package-summary.html

If you get any further information about the attributes please let me
know so I can include it.

=Stefan


signature.asc
Description: This is a digitally signed message part
___
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] Manager API quit working for no apparent reason

2005-07-14 Thread Moises Silva
output of netstat -lnp | grep asterisk does show the 5038 port?
post your manager.conf

best regards

On 7/13/05, Malcolm Bader <[EMAIL PROTECTED]> wrote:
> I have some agi scripts that use the manager API. They just quit working
> this afternoon.
> It seems that asterisk quit responding on port 5038.
> I can't even telnet to that port. (connection refused)
> I had been making some changes to extension.conf but that's all.
> I even went so far as to reboot the machine but the problem persists.
> Any ideas??
> Malcolm Bader
> 
> ___
> 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
> 


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org";
___
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] Manager API timestamps of events

2005-06-11 Thread Moises Silva
i think the time between sent event from Asterisk and catch the event
with some other application is not important for most applications, so
you may save the timestamp from your own application.

And of course you have other option, modify the function:

int manager_event(int category, char *event, char *fmt, ...)

in the file manager.c 

and there you can make it to always send a timestamp at the end of the events.

Best Regards.

On 6/11/05, Obelix <[EMAIL PROTECTED]> wrote:
> 
> 
> Does the manager API have the option of showing timestamps of events?
> 
> I am trying to log events into a database and I need timestamps of when the
> events actually occurred.
> 
> Is the time lag between events occurring and receiving them in the manager api
> very low? I suppose it if is I could timestamp the events themselves.
> 
> Obelix
> 
> 
> 
> This message was sent using IMP, the Internet Messaging Program.
> 
> ___
> 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
> 


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org";
___
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] Manager API - Redirect command

2005-03-18 Thread mattf



You 
should be able to get the full channel values by doing a "Action: 
Command    Command: Show Channels" and 
picking your SIP extension out of the list it gives you of active channels. Then 
you can take that and the channel that you are currently connected to, also 
taken from the "Show channels" output(I am assuming that you want to take both 
parties and dump them into the meetme room) and use those two channel values in 
the Redirect command.
 
If you 
do it right, neither you nor the person you were talking to would notice that 
you just moved into the meetme room. We use this method with the astGUIclient 
client application to transfer an existing conversation into a meetme room and 
it works great.
 
Hope 
this helps,
 
MATT---

  -Original Message-From: Vyom A 
  [mailto:[EMAIL PROTECTED]Sent: Friday, March 18, 2005 8:21 
  AMTo: Asterisk_users_mailing_listSubject: 
  [Asterisk-Users] Manager API - Redirect command
  I read the Wiki pages about the Redirect command, but,if I want to do 
  a redirect into a MeetMe room, from a *remote* machine, how do I *query* 
  Asterisk and get the Channel details?i.e the values for the Channel 
  and ExtraChannel.I am using *SIP only*.Also, when redirected, one end 
  Hangs up. Is this the intendedbehavior? 
  
  
  Do you Yahoo!?Yahoo! Small Business - Try 
  our new resources site! 
___
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] Manager API

2005-02-04 Thread Bill Seddon
<< Has anyone tried the API before?>>

Of course.  Here is a snippet taken from Nicolas Gudino's op_server.pl to
originate a call.  

my $comando = "Action: Originate\r\n";
$comando .= "Channel: $originate\r\n";
$comando .= "Exten: $canal\r\n";
$comando .= "Context: $meetme_context\r\n";
$comando .= "Priority: 1\r\n";
$comando .= "\r\n";
send_command_to_manager($comando);


Mondial Software Limited
020 7043 2795
www.mondialsoftware.com


Click here to view our presentation of Cash Controller showing its
forecasting and automated bank reconciliation features


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: February 04, 2005 7:41 AM
To: Asterisk-Users@lists.digium.com
Subject: [Asterisk-Users] Manager API

Hi,

I try to use Manager API to originate a call from a channel to an 
existing extension. Based on "sip channel show" command, the Manager 
initiates a call to the channel only. It doesn't generate a call to 
the extension. So the originate call API of Manager is failed. I think 
I pretty much follow the API description at http://www.voip-
info.org/wiki-Asterisk+Manager+API+Action+Originate. Has anyone tried 
the API before? Thanks.

Jason
-- 

___
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




___
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] Manager API !!!!!!!!!

2005-01-14 Thread Simon
Thanks to all ,

I have now managed to get the ExtentionState to return a Status value
BUT.

It seems to always return -1 whether the phone is on a call or not. Am I
missing something ? I would have thought it should return some other
value when the line is engaged OR am I looking at completely the wrong
thing to achieve my requested task.

Could be cos I am fick

Ta
Simon








--- 
This message has been scanned for viruses and
dangerous content by OrbitalNet, and is
believed to be clean. If you have any concerns
with this message please email us,
[EMAIL PROTECTED] / http://www.orbital.net
---

___
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] Manager API !!!!!!!!!

2005-01-13 Thread Jayson Vantuyl
On Thu, Jan 13, 2005 at 04:56:05PM -, Simon wrote:
> Hello all
> 
> Has anyone had any success with the Manager API ?
> 
> I am trying to check an extension status without too much luck I have
> the following

You can supply an ActionID in your request to track the response.  This
is most useful if your program gets out of sync with the management
protocol.  If you always specify and check the ActionID on the response,
you'll know that you're retrieving the correct response.

-- 
Jayson
___
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] Manager API !!!!!!!!!

2005-01-13 Thread Bill Seddon
<< Has anyone had any success with the Manager API ?>>

Yes, lots of success.  I think we found that tracking the status of an
extension is the most reliable way to monitor extension state.  We do issue
a PeerStatus request at the beginning but that's pretty time and resource
intensive.  Since the Manager is going issue status events anyway, we
monitor them and save the resources.

<< The second is anyone know what ActionID is ?>>

Yes, ActionID is a value you can use when issuing a command.  It there so
that you can be sure you respond to your own responses not to someone else's
or that you respond to an response instance in the correct way.  In a
multi-threaded app you might have several actions outstanding so you will
need to know what response corresponds to which command.

Bill Seddon

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon
Sent: January 13, 2005 4:56 PM
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] Manager API !

Hello all

Has anyone had any success with the Manager API ?

I am trying to check an extension status without too much luck I have
the following

\n";
  } else {
 $out = "Action: Login\r\n";
 $out .= "UserName: simon\r\n";
 $out .= "Secret: xx\r\n\r\n";
 
 fwrite($fp, $out);
  $in = "Action: ExtensionState\r\n";
  $in .= "Exten: 4367\r\n\r\n";
  $in .= "Context: office\r\n\r\n";  
  $in .= "ActionID: \r\n\r\n";
  $in .= "Action: Logoff\r\n\r\n";
  fwrite($fp,$in);
 while (!feof($fp)) {
 echo fgets($fp, 128);
 }
 fclose($fp);
  }
 
  ?>

The first prob is it ignores the Context and just goes to default.
The second is anyone know what ActionID is ?

Best Regards
Simon



--- 
This message has been scanned for viruses and
dangerous content by OrbitalNet, and is
believed to be clean. If you have any concerns
with this message please email us,
[EMAIL PROTECTED] / http://www.orbital.net
---

___
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




___
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] Manager API !!!!!!!!!

2005-01-13 Thread Malcolm Bader
Simon wrote:
Hello all
Has anyone had any success with the Manager API ?
I am trying to check an extension status without too much luck I have
the following

   

 $fp = fsockopen("127.0.0.1", 5038, $errno, $errstr, 30);
 if (!$fp) {
echo "$errstr ($errno)\n";
 } else {
$out = "Action: Login\r\n";
$out .= "UserName: simon\r\n";
$out .= "Secret: xx\r\n\r\n";

fwrite($fp, $out);
 $in = "Action: ExtensionState\r\n";
 $in .= "Exten: 4367\r\n\r\n";
 $in .= "Context: office\r\n\r\n";  
 $in .= "ActionID: \r\n\r\n";
 $in .= "Action: Logoff\r\n\r\n";
 fwrite($fp,$in);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
 }

 ?>

The first prob is it ignores the Context and just goes to default.
The second is anyone know what ActionID is ?
Best Regards
Simon

--- 
This message has been scanned for viruses and
dangerous content by OrbitalNet, and is
believed to be clean. If you have any concerns
with this message please email us,
[EMAIL PROTECTED] / http://www.orbital.net
---

___
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
 

Here is the php code that works for me:
I use this to get a list of extensions that are in use.
$socket = fsockopen("127.0.0.1","5038", $errno, $errstr, $timeout);
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: xxx\r\n");
fputs($socket, "Secret: xxx\r\n\r\n");
fputs($socket, "Action: command\r\n");
fputs($socket, "Command: show channels\r\n\r\n");
fputs($socket, "Action: Logoff\r\n\r\n");
while (!feof($socket)) {
$wrets = fgets($socket, 4096);
$wrets = trim($wrets);
if(substr($wrets,0,3)=="SIP"){
$m_start = strpos($wrets,'/');
$m_end = strpos($wrets,'-');
$m_ext = substr($wrets,$m_start+1,($m_end-$m_start)-1);
//do something here with the extension number
}
if(substr($wrets,0,4)=="IAX2"){
$m_start = strpos($wrets,'/');
$m_end = strpos($wrets,'@');
$m_ext = substr($wrets,$m_start+1,($m_end-$m_start)-1);
//do something here with the extension number
}
}
fclose($socket);
I think  ActionID is just an ID number for your own use.
Malcolm
___
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] manager API

2005-01-05 Thread Christopher L. Wade
Guys,
After connecting to the * manager, each and every event is sent to the
connected client, right?
This means that if I install a client on each PC for monitoring incoming
calls, or pretty much anything else, it will create a lot of excess
traffic on my LAN.
Can I connect to the manager and tell it to send only events regarding
specific extension(s) my way?
I'd like to provide a popup display say "incoming call from CALLERID"
and provide a way for the callee to divert it to voicemail or something
like that.
Thanks
Another option would be to write a manager proxy (look on the wiki - 
several simple examples already exist) that only sends particular events 
on to clients who request them.  Basically have a script connect to * 
one time.  Clients then connect to this script instead of * and tell the 
script what messages they want to know about.  At this point the script 
handles the end clients - not * - a double benefit (less net traffic and 
less work for *).

-Chris
___
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] manager API

2005-01-04 Thread mattf
Hello,

You are correct, it's a lot of data for each client to parse through and a
lot of data for the se5rver to be sending out. It would just be easier to
use an AGI to trigger an action on the client computer, or you could just
use astGUIclient which already does what you are trying to do:

http://astguiclient.sf.net

This software suite has a central manager queue as well as a collection of
AGI scripts and server scripts to do several things like incoming call popup
with callerID searching through a web browser as well as in-call recording
and conference calling of up to 6 channels on even a single line phone and
several other features.

It is free as in GPL and works on UNIX and Win32.

MATT---


-Original Message-
From: Shoval Tomer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 5:42 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] manager API


Guys,
After connecting to the * manager, each and every event is sent to the
connected client, right?

This means that if I install a client on each PC for monitoring incoming
calls, or pretty much anything else, it will create a lot of excess
traffic on my LAN.

Can I connect to the manager and tell it to send only events regarding
specific extension(s) my way?

I'd like to provide a popup display say "incoming call from CALLERID"
and provide a way for the callee to divert it to voicemail or something
like that.

Thanks

Shoval Tomer,
IT Manager,
SofTov Advanced Systems, Ltd.
Office: +972-3-9230686 ext. 179
Fax: +972-3-9216642
Mobile: +972-54-8000200


___
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
___
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] Manager API

2005-01-04 Thread Serge Schumacher
First class service, thanks a lot :)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of mattf
Sent: mardi 4 janvier 2005 03:48
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Manager API

There really isn't a solid description of every Manager API function, even
in the source code. And some of the features listed may not work the way you
think they should.

As for Monitor, there really isn't much more than to say that you send it a
channel and optionally a filename and it will start recording. 

I'll try to fill in some gaps on the Wiki tonight, take a look in the
morning.

http://www.voip-info.org/wiki-Asterisk+manager+API

MATT---


-Original Message-
From: Serge Schumacher [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 8:38 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Manager API


Hi,

Where can I find a complete * manager api guide, the one one wiki is missing
informations like the monitor function for example,


Thnx
Serge

___
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
___
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

___
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] Manager API

2005-01-03 Thread mattf
There really isn't a solid description of every Manager API function, even
in the source code. And some of the features listed may not work the way you
think they should.

As for Monitor, there really isn't much more than to say that you send it a
channel and optionally a filename and it will start recording. 

I'll try to fill in some gaps on the Wiki tonight, take a look in the
morning.

http://www.voip-info.org/wiki-Asterisk+manager+API

MATT---


-Original Message-
From: Serge Schumacher [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 8:38 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Manager API


Hi,

Where can I find a complete * manager api guide, the one one wiki is missing
informations like the monitor function for example,


Thnx
Serge

___
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
___
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] Manager API Call Origination & Variables

2004-11-15 Thread Bob Knight
Peter Osborne wrote:
Hi all,
I am using the Asterisk Manager API to originate calls and it is working well, 
when a call is placed the local phone rings, once you pick it up you can here 
the call ringing the other end. Now, I am using Polycom IP 300 and I have 
them setup to auto-answer if I set the ALERT_INFO variable to "Ring Answer". 
This works fine from my dial plan but I can't figure out how to set 
ALERT_INFO from the Manager API. Basically I want calls that are originated 
from the Manager API to automatically take place on the speaker phone.

I have tried
Action: SetVar
Channel: sip/pete_desk
Variable: ALERT_INFO
Value: Ring Answer
but it gives me about no such channel but this is the same channel I use to 
place the call immediately after attempting to set the variable.

Any ideas?
I have 2 extension entries for all my auto-answer phones.
If you dial just the normal extension (like 1234) it does the
normal answer thing.
If you dial an * before the extension (like *1234) it does
the auto answer thing.
So you could just use:
Channel: sip/*1234 or
Channel: sip/*pete_dest
--
Bob Knight
[-w] the work option
[EMAIL PROTECTED]
925-449-9163
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API Call Origination & Variables

2004-11-15 Thread Brian D'Arcy
I'm using this in production, and it works like a charm. (example from
PHP).  Phone numbers have been changed to protect the innocent. ;)

fputs($socket, "Action: Originate\r\n");
fputs($socket, "Channel: Zap/g1d/1234567890\r\n");
fputs($socket, "Exten: 5002\r\n");
fputs($socket, "Priority: 1\r\n");
fputs($socket, "Context: userexten\r\n");
fputs($socket, "Variable: dialnumber=76|confnumber=3236\r\n");
fputs($socket, "CallerID: Dev Meeting <760-000->\r\n\r\n");

Brian D'Arcy
Operations Engineer
Akiva Corporation

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:asterisk-users-
> [EMAIL PROTECTED] On Behalf Of Peter Osborne
> Sent: Monday, November 15, 2004 2:09 PM
> To: [EMAIL PROTECTED]
> Cc: Peter Svensson
> Subject: Re: [Asterisk-Users] Manager API Call Origination & Variables
> 
> Well I tried just about every combination that I can think of as well
as
> every
> combination mentioned and it still doesn't work. Not sure why, maybe
it's
> just not possible from the Manager API.
> 
> Pete
> 
> On Monday 15 November 2004 04:56, Peter Svensson wrote:
> > On Mon, 15 Nov 2004, Brian West wrote:
> > > Ok to cut confusion here
> > >
> > > Its:
> > > Variable: _ALERT_INFO
> > > Value: somevalue
> > >
> > > Its always var/val via manager.
> >
> > Not in the Originate action it isn't. This is what both the help
> >   show manager command originate
> > say and what reading the source indicates. From the help:
> >
> > Variable: Channel variable to set (VAR1=value1|VAR2=value2)
> >
> > Peter
> >
> > > > The channel does not exist prior to the Originate action.
However,
> you
> > > > may be able to pass variables in the originate command itself:
> > > >
> > > > Action: Originate
> > > > Channel: sip/12345
> > > > Exten: 1234
> > > > Context: default
> > > > Variable: _ALERT_INFO=Ring Answer|SomeOtherVar=SomeOtherValue
> > > >
> > > > This may work.
> > > >
> > > > Peter
> >
> > Peter
> >
> > ___
> > Asterisk-Users mailing list
> > [EMAIL PROTECTED]
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> ___
> Asterisk-Users mailing list
> [EMAIL PROTECTED]
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API Call Origination & Variables

2004-11-15 Thread Peter Osborne
Well I tried just about every combination that I can think of as well as every 
combination mentioned and it still doesn't work. Not sure why, maybe it's 
just not possible from the Manager API.

Pete

On Monday 15 November 2004 04:56, Peter Svensson wrote:
> On Mon, 15 Nov 2004, Brian West wrote:
> > Ok to cut confusion here
> >
> > Its:
> > Variable: _ALERT_INFO
> > Value: somevalue
> >
> > Its always var/val via manager.
>
> Not in the Originate action it isn't. This is what both the help
>   show manager command originate
> say and what reading the source indicates. From the help:
>
> Variable: Channel variable to set (VAR1=value1|VAR2=value2)
>
> Peter
>
> > > The channel does not exist prior to the Originate action. However, you
> > > may be able to pass variables in the originate command itself:
> > >
> > > Action: Originate
> > > Channel: sip/12345
> > > Exten: 1234
> > > Context: default
> > > Variable: _ALERT_INFO=Ring Answer|SomeOtherVar=SomeOtherValue
> > >
> > > This may work.
> > >
> > > Peter
>
> Peter
>
> ___
> Asterisk-Users mailing list
> [EMAIL PROTECTED]
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API Call Origination & Variables

2004-11-15 Thread Peter Svensson
On Mon, 15 Nov 2004, Brian West wrote:

> Ok to cut confusion here
> 
> Its:
> Variable: _ALERT_INFO
> Value: somevalue
> 
> Its always var/val via manager.


Not in the Originate action it isn't. This is what both the help 
  show manager command originate 
say and what reading the source indicates. From the help:

Variable: Channel variable to set (VAR1=value1|VAR2=value2)

Peter





> > The channel does not exist prior to the Originate action. However, you may
> > be able to pass variables in the originate command itself:
> > 
> > Action: Originate
> > Channel: sip/12345
> > Exten: 1234
> > Context: default
> > Variable: _ALERT_INFO=Ring Answer|SomeOtherVar=SomeOtherValue
> > 
> > This may work.
> >
> > Peter

Peter

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API Call Origination & Variables

2004-11-15 Thread Brian West
Ok to cut confusion here

Its:
Variable: _ALERT_INFO
Value: somevalue

Its always var/val via manager.

bkw

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:asterisk-users-
> [EMAIL PROTECTED] On Behalf Of Peter Svensson
> Sent: Monday, November 15, 2004 2:50 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] Manager API Call Origination & Variables
> 
> On Mon, 15 Nov 2004, Peter Osborne wrote:
> 
> > I am using the Asterisk Manager API to originate calls and it is working
> well,
> > when a call is placed the local phone rings, once you pick it up you can
> here
> > the call ringing the other end. Now, I am using Polycom IP 300 and I
> have
> > them setup to auto-answer if I set the ALERT_INFO variable to "Ring
> Answer".
> > This works fine from my dial plan but I can't figure out how to set
> > ALERT_INFO from the Manager API. Basically I want calls that are
> originated
> > from the Manager API to automatically take place on the speaker phone.
> >
> > I have tried
> >
> > Action: SetVar
> > Channel: sip/pete_desk
> > Variable: ALERT_INFO
> > Value: Ring Answer
> 
> The channel does not exist prior to the Originate action. However, you may
> be able to pass variables in the originate command itself:
> 
> Action: Originate
> Channel: sip/12345
> Exten: 1234
> Context: default
> Variable: _ALERT_INFO=Ring Answer|SomeOtherVar=SomeOtherValue
> 
> This may work.
> 
> Peter
> 
> 
> 
> ___
> Asterisk-Users mailing list
> [EMAIL PROTECTED]
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API Call Origination & Variables

2004-11-15 Thread Peter Svensson
On Mon, 15 Nov 2004, Peter Osborne wrote:

> I am using the Asterisk Manager API to originate calls and it is working 
> well, 
> when a call is placed the local phone rings, once you pick it up you can here 
> the call ringing the other end. Now, I am using Polycom IP 300 and I have 
> them setup to auto-answer if I set the ALERT_INFO variable to "Ring Answer". 
> This works fine from my dial plan but I can't figure out how to set 
> ALERT_INFO from the Manager API. Basically I want calls that are originated 
> from the Manager API to automatically take place on the speaker phone.
> 
> I have tried
> 
> Action: SetVar
> Channel: sip/pete_desk
> Variable: ALERT_INFO
> Value: Ring Answer

The channel does not exist prior to the Originate action. However, you may 
be able to pass variables in the originate command itself:

Action: Originate
Channel: sip/12345
Exten: 1234
Context: default
Variable: _ALERT_INFO=Ring Answer|SomeOtherVar=SomeOtherValue

This may work.

Peter



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] manager api: how to handle failed calls

2004-11-15 Thread Luca Casavola




Hello Nicolas, first of all I want to thank you. You are the first guy
give me an answer. I already posted this issue two times but nobody was
interested in it.
I tried your sugggestion but it doesn't work. In the mean time I
upgraded to v1.0.2 but things remain the same or even worse ( I have in
the log a new channel name OutgoingSpoolFailed but the behaviour is the
same).
Any way perhaps I found a solution and I would like to ask what do you
think about it:
This is the request:
/bin/echo "Action: Originate";\
/bin/echo "Channel: Local/[EMAIL PROTECTED]";\
/bin/echo "Variable:
callid=123456|number=X|url="">
/bin/echo "Context: chiamamezzi3";\
/bin/echo "Exten: s";\
/bin/echo "Priority: 1";\
/bin/echo "Callerid: Asterisk Automatic Wardial";\
/bin/echo "Timeout: 1";\
/bin/echo "Async: True";\  ** this is important otherwise fail
extension doesn't work **
/bin/echo "ActionId: 10";\

This is the context 
[chiamamezzi3]
exten => _.X,1,Dial(ZAP/g1/${EXTEN})
exten => _.X,2,NoOp( _.X  DIALSTATUS is ${DIALSTATUS}, number is
${number} )
exten => _.X,3,SetGlobalVar(status=${DIALSTATUS})
exten => s,1,Wait,1
exten => s,2,Answer
exten => s,3,DigitTimeout,5
exten => s,4,ResponseTimeout,10
exten => s,5,system(/prd/asterisk/log.sh "Variabili:
[menuid=${menuid}] [number=${number}] [redirectnum=${redirectnum}]
[url="" [callid=${callid}]")
exten => s,6,Goto(chiamamezzi-${menuid},s,1) 
exten => t,1,Goto(noanswer,s,1)
exten => failed,1,NoOp( failed  DIALSTATUS is ${status} number is
${number})
exten => failed,2,Hangup()
exten => h,1,Hangup()


As I told you, If the call is ok dialplan goes on s, 1
If the call fails I proceed on _.X,2 and 3 and I need to set a
globalvariable to let to handle it  in the failed extension.
It works but I don't know if it could work on multi request environment
. It would be much better to use a channel variable or even better, to
have DIALSTATUS directly available .
Regards
Luca Casavola


Nicolás Gudiño wrote:

  Hello,

Comments inline..

  
  
 The question is how to correctly handle failed calls. 
 In my application I want to make  hundreds of outgoing calls automatically.
 When the callee  pick up the phone he gets a playback message and give an
acknowledge by means of dtmf code. 
 I make use of manager command originate, something like 
 Action:originate 
 channel: ZAP/g1/ 
 Variable:X|Y|Z 
 extension: test 
 the extension test is something like 
 [test] 
 exten  s,1 , wait ()
 exten  s, 2 , answer ()
 exten s, 3 playback(XX) 
 The problem is since I don't use the application dial  inside the extension
I cannot get any value from 
 DIALSTATUS or HANGUPCAUSE variable 
 I tried several strategies: 
 1) 
 change the logic and use local pseudo channel 
 In the originate command if I use channel: local/[EMAIL PROTECTED]/n 
 where test1 is:
 [test1] 
 exten => _.,1,Dial(ZAP/g1/g${EXTEN}) 
 exten => _.,2,NoOp( 2 HANGUPCAUSE is ${HANGUPCAUSE}) 
 exten => _.,3,NoOp( 2 DIALSTATUS is ${DIALSTATUS}) 
 exten => _.,4,NoOp(  number is ${number}) 
 exten => _.,5,Hangup 
 
 I got the correct HANGUP value ( ie BUSY) but unfortunately  I cannot see
the variables set on the originate command.
 I wonder  why not? 

  
  
Maybe, (just maybe, I did not try it myself)  the originate variables
are passed using asterisk CVS-HEAD and variable names prefixed with
underscore... Eg: Use variable _X instead of X in the originate
command. Let me know if it works.

Regards,

  






___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] manager api: how to handle failed calls

2004-11-14 Thread Nicolás Gudiño
Hello,

Comments inline..

>  The question is how to correctly handle failed calls. 
>  In my application I want to make  hundreds of outgoing calls automatically.
>  When the callee  pick up the phone he gets a playback message and give an
> acknowledge by means of dtmf code. 
>  I make use of manager command originate, something like 
>  Action:originate 
>  channel: ZAP/g1/ 
>  Variable:X|Y|Z 
>  extension: test 
>  the extension test is something like 
>  [test] 
>  exten  s,1 , wait ()
>  exten  s, 2 , answer ()
>  exten s, 3 playback(XX) 
>  The problem is since I don't use the application dial  inside the extension
> I cannot get any value from 
>  DIALSTATUS or HANGUPCAUSE variable 
>  I tried several strategies: 
>  1) 
>  change the logic and use local pseudo channel 
>  In the originate command if I use channel: local/[EMAIL PROTECTED]/n 
>  where test1 is:
>  [test1] 
>  exten => _.,1,Dial(ZAP/g1/g${EXTEN}) 
>  exten => _.,2,NoOp( 2 HANGUPCAUSE is ${HANGUPCAUSE}) 
>  exten => _.,3,NoOp( 2 DIALSTATUS is ${DIALSTATUS}) 
>  exten => _.,4,NoOp(  number is ${number}) 
>  exten => _.,5,Hangup 
>  
>  I got the correct HANGUP value ( ie BUSY) but unfortunately  I cannot see
> the variables set on the originate command.
>  I wonder  why not? 

Maybe, (just maybe, I did not try it myself)  the originate variables
are passed using asterisk CVS-HEAD and variable names prefixed with
underscore... Eg: Use variable _X instead of X in the originate
command. Let me know if it works.

Regards,

-- 
Nicolás Gudiño
Buenos Aires - Argentina
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API / Agents

2004-10-21 Thread Nicolás Gudiño
Hi,

On Thu, 21 Oct 2004 11:37:27 +0100, Ben Merrills <[EMAIL PROTECTED]> wrote:
>  
> Is there a way to find out which agents are logged in, without waiting for
> the Agentcallbacklogin/off event? 
> 
> I'd like to be able to get the login status of all Agents when I connect to
> the Manager API. Is this possible? 
> 

I have just implemented this in the Flash Operator Panel, I use:

Action: Command
Command: show agents

And then some perl magic... FYI, every CLI command can be executed
from manager this way. Regards,

-- 
Nicolás Gudiño
Buenos Aires - Argentina
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
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] Manager API Problem

2003-12-12 Thread Nick Bachmann
Michael Devenijn wrote:

Everythings works great with asterisk exept one feature with redirect 
: it doesn't redirect when ringing ...
Have you used astman with a new CVS?  It works for me...

If not, you'll need to post more information for the list to help you.

Nick

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users