Comments (3)
This is what I use:
if (!channel.IsBridged)
{
ColorConsole.WriteLine("Bridge Failed - {0}"
.Fmt(channel.GetVariable("last_bridge_hangup_cause")).Red());
await channel.Play("ivr/ivr-call_rejected.wav");
await channel.Hangup(HangupCause.NormalTemporaryFailure);
}
The idea that by keeping all the state accessible via the channel
object your code will be more succinct.
from neventsocket.
I'm considering there may be a case for strongly typed access to the most commonly-used channel vars eg channel.Variables.BridgeHangupCause
from neventsocket.
ColorConsole.WriteLine("Bridge Failed - {0}".Fmt(channel.Variables.BridgeHangupCause).Red());
^ that's a bit better.
I've been going around around on this trying to make this API usable as you can see here: #18
from neventsocket.
Related Issues (20)
- Public member 'Where' on type 'Select(Of BasicMessage,EventMessage)' not found. HOT 14
- Not all CHANNEL_HANGUP_COMPLETE are received HOT 6
- ApiResponse.ErrorMessage returns a trailing "\n" HOT 2
- ApiResponse: Is "-ERR no reply" an error? HOT 3
- Use Logging/Diagnostics context for Channels
- Split Channel Events into separate message type/observable HOT 1
- Feature: Add Event helpers for Sofia custom events HOT 1
- socket disconnect HOT 1
- ChannelHangupComplete event HOT 8
- BridgedChannels and OtherLeg HOT 1
- BridgeTo hangs when called multiple times HOT 6
- Cannot access a disposed object. Object name: 'NEventSocket.InboundSocket'. HOT 3
- All calls return HangupCause.UnallocatedNumber HOT 2
- PlayGetDigitsResult is not Success when no digits is provided by user HOT 2
- Cancel networkStream.ReadAscync() on socket shutdown
- Bridge simultaneous ring multiple endpoints HOT 1
- I will pay for good help configuring freeswitch and making the demo code work.
- Hangup call after number of seconds
- Transfer audio between two legs of call
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 neventsocket.