Multiple variables set in Orignate AMI action are merged/joined
See original GitHub issueI am trying to use Asterisk AMI OriginateAction method to dial out calls. Calls are working fine But I am having issue on setting variables on this action. I set 2 variables as following:
oc.SetVariables( new Dictionary<string, string>(){ { "SIPADD", "10001"}, { "VQWAITER", "10002" }});
but when i try to get one of the variables “SIPADD” in dialplan. I get both vairables at once in joined form as “Local/10002|_VQWAITER=10001”
Dialplan:
exten => 999,1,NoOp((Caller ID IS: ${CALLERID(num)}))
same => n,Answer()
same => n,NoOp("Callback Agent Address: "${SIPADD})
same => n,Dial(${SIPADD})
same => n,Hangup()
Follwoing is above CLI trace of above dialplan:
Can anyone please guide me whats the issue here? I want to get these variables separately an not joined like this.
For now as a work arround i am splitting the joined string i get by doing following setps in dialplan:
same => n,NoOp("Callback Agent Address: "${SIPADD})
same => n,Set(localSIPAdd=${CUT(SIPADD,|,1)})
same => n,Set(waiter=${CUT(SIPADD,|,2)})
same => n,NoOp("localSIP: "${localSIPAdd})
same => n,NoOp("waiter: "${waiter})
same => n,Set(CALLERID(num)=waiter)
CLI for above change:
My question on stackoverflow: https://stackoverflow.com/questions/59825353/originateaction-variables-joining-issue-asterisk
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
OriginateAction Variables joining issue - asterisk
Current workaround is to manually set the VAR_DELIMITER property on the connection after connecting to the Asterisk server. managerConnection.
Read more >Passing multiple Variables from AMI's Origintate action
Problem: using PHPAGI's AMI to call Originate action to send multiple variables to dialplan separated by |. BUT they all coming as one...
Read more >[asterisk-users] Multiple Channel Variables with AMI ...
I want to set about 3 channel variables when I originate a call via AMI. All the documentation I have found says to...
Read more >[asterisk-users] How to send variables through AMI originate
trixbox1*CLI> manager show command originate > > Action: Originate ... Variable: Channel variable to set, multiple Variable: headers are ...
Read more >Create a launch template for an Auto Scaling group
The following steps describe how to configure your launch template: Specify the Amazon Machine Image (AMI) from which to launch the instances. Choose...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Deantwo
core show version Asterisk 16.6.2 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2019-11-22 00:56:40 UTC
Workaround
After connecting to the AIM, do the following: