Comments (3)
What version of AsterNET.ARI are you using please? There was a problem in an older version that might have caused something like that.
from asternet.ari.
I build headers like so:
variables = new Dictionary <string, string>();
var counter = 0;
foreach (var h in _headers)
{
variables.Add($"SIPADDHEADER{counter}", h);
counter++;
}
where h is a string something like "headername: value"
then
_client.Channels.OriginateWithId(
ChannelId,
"SIP/foo",
app: _ariAppName,
timeout: _timeout,
callerId: _callerId,
variables: variables);
from asternet.ari.
I downloaded from Nuget - version 1.1.0 - the last, as I understand it. After reading the article to clone the repository - the result is the same. The file has a title:
AsterNET ARI Framework Automatically generated file @ 12/10/2015 11:53:27
Asterisk version - tried as 12 and 13 (the latest version).
In our case, when serializing the dictionary we get a string without a key "variables" - a set of data transmitted in a dictionary of key/value (which is logical). If you use swager - online service at asterisk.org - there need to just format {"variables" : {"key1:val1", "key2:val2", "key3:val3"}}, but it passed only {"key1:val1", "key2:val2", "key3:val3"} and header not set (sorry my English). I add one row in method AddParametr (Command.cs):
public void AddParameter(string name, object value, Middleware.ParameterType type)
{
if (type == ParameterType.RequestBody)
{
Request.RequestFormat = DataFormat.Json;
var SetValuesDict = new Dictionary<string, object> { { "variables", value } };
Request.AddParameter(name, JsonConvert.SerializeObject(SetValuesDict), (RestSharp.ParameterType)Enum.Parse(typeof(RestSharp.ParameterType), type.ToString()));
}
else
{
Request.AddParameter(name, value, (RestSharp.ParameterType)Enum.Parse(typeof(RestSharp.ParameterType), type.ToString()));
}
}
and all work good for my case... I do not want to go into the source code - I want to be updated with no problems .... Help, please ...
from asternet.ari.
Related Issues (20)
- Use library in .net8
- Nuget package with .net standard support
- How to click2dial? HOT 1
- Having exception while trying to send notifications to SignalR connected clients based on DeviceStateChangeEvent
- Instructions
- PlayAsync throwing exception HOT 1
- References FUBAR HOT 1
- How to add recipient to Conference
- How to add recipient to Conference HOT 2
- SimpleConf RemoveUser throwing exception HOT 2
- How use GetObject /UpdateObject ? HOT 1
- does this API support "External Media"
- README.md: link is failed
- No errors when read only
- Asternet softphone
- Recording not working HOT 1
- Need help on how to use this library to send caller number to our CRM system
- ARI RTPStats fields have wrong data type
- Event filtering call on application does nothing
- class AsyncDispatcher : IAriDispatcher improperly uses 'await Task.Run(action)'. Because methods are 'events' with void return, await does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asternet.ari.