AMI interface > multiple Application keys


(Croissantisokay) #1

Hi,

I need to know the following:

1)Does the Originate action support multiple Application keys? If so,how does it handle the order in which they’re added to the Originate action?

2)If it does not support multiple Application keys, I’ll have to instruct the Originate action to enter a context in the dialplan, and pass the sequence of applications in its Variable key. How would I configure the dialplan context to dynamically handle the sequence of applications to execute? Are there alternatives for doing what I require?

Hope someone know about this.
Good monday y’all


(Dave Burgess) #2

I would assume not, then create an application that does what you are specifically looking for. The limits the variability you are concerned about in the second part of your question.

Within the context, you can use asterisk-level variables, including astdb database tuples that include as much or as little detail as you need. You can pass the astdb variable indirectly through the event/context that produces the Originate call. Once the data is secure, you can use “if” functions within the context to perform as many and as complex steps as you’d care to implement.


(Croissantisokay) #3

Ty i will try


(Croissantisokay) #4

Is it possible to use the “GOTO” application to redirect my Action : originate into custom dialplan in “extension_custom.con” ?


(Dave Burgess) #5

Once you’re in a call, you aren’t under context control, per se, so you’d have to set everything up before you can originate the call. Once you are in the call, the only variability you’d have would be something like an on-demand audio stream or an IVR.


(Croissantisokay) #6

i see.
I wanted to inject dialplan with application feature to do a curl call when the call is picked up.

Because i wanted to know when the called answer to the call


(Dave Burgess) #7

If you follow the AMI status stream, you will get the “answered” information from the existing datastream - no need for any special or custom programming there. The only way for you to effect the call, however, is to start another call leg and join the (now) three calls together into a pseudo-conference.

Now, the “I don’t want to tell you what I’m actually doing” implications in your questions so far have led us to the point that, without more details, the answers are going to start being “I don’t know - try it.”

If you want to get more specific, the answer can too. From a general perspective, though, I’m feeling like this is something you’re just going to have to program out.


(Croissantisokay) #8

To be more specific.

I got 2 users :
User 1 [Caller] (custom webRTC)
User 2 [Called] (normal smartphone)

__
User 1 join a conference through a custom webRTC.

At this point the user is alone in the conference and have many buttons,
i got one that call a php script :


Php :
telnet IP PORT
_
Action : login
_
Action : originate


At the moment the “Action : originate” application is confbrige. That allow the User 2 to join User 1 when he answer the smartphone.

But actually i got an other server. And i wan’t to do a curl call :
Set(foo=${CURL(https://adresse.com)})

just before or after the confbridge application… when he answer the call

sorry for being not very sharp with my explanations


(Lorne Gaetz) #9

Cool, another school project!

It sounds like you want to ORIGINATE to EXTENSION (not application) and call your own context using the local channel such as to channel local/xxxx@my-own-context

[my-own-context]
exten => _.,1,Noop(Entering user defined context my-own-context)
exten => _.,n, Set(foo=${CURL(https://adresse.com/)})
exten => _.,n,Goto(from-internal,${EXTEN},1)
exten => _.,n,Hangup()

(Croissantisokay) #10

Ty ! This is the same project, we are creating an interface for disabled people :wink:

Sounds good, but i wanted to trigger the CURL call just at the moment i pick up the call with my smartphone, is it even possible ?


(Croissantisokay) #11

I just see this :

ConfbridgeJoin

https://wiki.asterisk.org/wiki/display/AST/ConfBridge+AMI+Events

is it possible to bind a curl call in this event?


(system) closed #12

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.