Peter Osborne
2004-Nov-15 12:19 UTC
[Asterisk-Users] Manager API Call Origination & Variables
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? Thanks, Pete
Peter Svensson
2004-Nov-15 13:49 UTC
[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 AnswerThe 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
Brian D'Arcy
2004-Nov-15 15:31 UTC
[Asterisk-Users] Manager API Call Origination & Variables
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=7600000000|confnumber=3236\r\n"); fputs($socket, "CallerID: Dev Meeting <760-000-0000>\r\n\r\n"); Brian D'Arcy Operations Engineer Akiva Corporation> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Peter Osborne > Sent: Monday, November 15, 2004 2:09 PM > To: asterisk-users@lists.digium.com > 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 wellas> every > combination mentioned and it still doesn't work. Not sure why, maybeit'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 > > 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 >
Bob Knight
2004-Nov-15 16:09 UTC
[Asterisk-Users] Manager API Call Origination & Variables
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 bk@minusw.com 925-449-9163