Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] AMI vs. Dialplan Originate


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
Antony.Stone at asteri...
Guest





PostPosted: Tue Sep 22, 2020 5:38 am    Post subject: [asterisk-users] AMI vs. Dialplan Originate Reply with quote

Hi.

(Asterisk 16.2.1)

I'm using AMI Originate to initiate calls, and I'm passing some additional
data in to the dialplan context using the Variable: parameter. Works fine.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Originate

Now I need to do the same thing but from another context in my dialplan, so I
was expecting to use the Originate() dialplan command, but how do I pass the
additional data? I don't see any Variable: equivalent parameter.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Originate

Thanks for any pointers.


Antony.

--
BASIC is to computer languages what Roman numerals are to arithmetic.

Please reply to the list;
please *don't* CC me.

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jcolp at sangoma.com
Guest





PostPosted: Tue Sep 22, 2020 6:28 am    Post subject: [asterisk-users] AMI vs. Dialplan Originate Reply with quote

On Tue, Sep 22, 2020 at 7:37 AM Antony Stone <Antony.Stone@asterisk.open.source.it (Antony.Stone@asterisk.open.source.it)> wrote:

Quote:
Hi.

(Asterisk 16.2.1)

I'm using AMI Originate to initiate calls, and I'm passing some additional
data in to the dialplan context using the Variable: parameter.  Works fine.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Originate

Now I need to do the same thing but from another context in my dialplan, so I
was expecting to use the Originate() dialplan command, but how do I pass the
additional data?  I don't see any Variable: equivalent parameter.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Originate


The Originate dialplan application itself has no inherent built in ability to set variables. 



--
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
Back to top
Antony.Stone at asteri...
Guest





PostPosted: Tue Sep 22, 2020 6:46 am    Post subject: [asterisk-users] AMI vs. Dialplan Originate Reply with quote

On Tuesday 22 September 2020 at 13:27:27, Joshua C. Colp wrote:

Quote:
On Tue, Sep 22, 2020 at 7:37 AM Antony Stone wrote:
Quote:
Hi.

(Asterisk 16.2.1)

I'm using AMI Originate to initiate calls, and I'm passing some
additional data in to the dialplan context using the Variable:
parameter. Works fine.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Orig
inate

Now I need to do the same thing but from another context in my dialplan,
so I was expecting to use the Originate() dialplan command, but how do I
pass the additional data? I don't see any Variable: equivalent parameter.


https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Origin
ate

The Originate dialplan application itself has no inherent built in ability
to set variables.

Oh Sad Not as direct an equivalent as I'd expected, then.

Any suggestions for how to get round this - my first idea is to get something
into the Asterisk internal DB in the context which does the Originate(), and
then read the data out in the called context.

Maybe I need to set some inherited variables and then use Dial() instead of
Originate...

Ideas welcome :)


Antony.

--
It is also possible that putting the birds in a laboratory setting
inadvertently renders them relatively incompetent.

- Daniel C Dennett

Please reply to the list;
please *don't* CC me.

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
johnkiniston at gmail.com
Guest





PostPosted: Tue Sep 22, 2020 4:50 pm    Post subject: [asterisk-users] AMI vs. Dialplan Originate Reply with quote

You could do the old school method and create and move a .call file from your dialplan.

exten => writefile,1,NoOP()
 same => n,Set(CALLFILE=/var/spool/asterisk/tmp/${FileName}-${ARG1}.call)
 same => n,Set(FILE(${CALLFILE},,,al,u)=Channel: SIP/bob)
 same => n,Set(FILE(${CALLFILE},,,al,u)=WaitTime: 20)
 same => n,Set(FILE(${CALLFILE},,,al,u)=Context: alice)
 same => n,Set(FILE(${CALLFILE},,,al,u)=Extension: s)
 same => n,Set(FILE(${CALLFILE},,,al,u)=Priority: 1)
 same => n,Set(FILE(${CALLFILE},,,al,u)=SetVar: John=AWESOME
 same => n,Set(FILE(${CALLFILE},,,al,u)=Archive: Yes); we want to keep the call file for debugging
 same => n,system(mv ${CALLFILE} /var/spool/asterisk/outgoing/); Move the file into the spool


On Tue, Sep 22, 2020 at 4:47 AM Antony Stone <Antony.Stone@asterisk.open.source.it (Antony.Stone@asterisk.open.source.it)> wrote:

Quote:
On Tuesday 22 September 2020 at 13:27:27, Joshua C. Colp wrote:

Quote:
On Tue, Sep 22, 2020 at 7:37 AM Antony Stone wrote:
Quote:
Hi.

(Asterisk 16.2.1)

I'm using AMI Originate to initiate calls, and I'm passing some
additional data in to the dialplan context using the Variable:
parameter.  Works fine.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Orig
inate

Now I need to do the same thing but from another context in my dialplan,
so I was expecting to use the Originate() dialplan command, but how do I
pass the additional data?  I don't see any Variable: equivalent parameter.


https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Origin
ate

The Originate dialplan application itself has no inherent built in ability
to set variables.

Oh Sad  Not as direct an equivalent as I'd expected, then.

Any suggestions for how to get round this - my first idea is to get something
into the Asterisk internal DB in the context which does the Originate(), and
then read the data out in the called context.

Maybe I need to set some inherited variables and then use Dial() instead of
Originate...

Ideas welcome Smile


Antony.

--
It is also possible that putting the birds in a laboratory setting
inadvertently renders them relatively incompetent.

 - Daniel C Dennett

                                                   Please reply to the list;
                                                         please *don't* CC me.

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services