Dialing extension while making outbound call

Sep 28, 2010 at 8:42 AM

Twilio allows to dial extension number using SendDigits parameter in request. I would love to see this in TSL.net .

This is how I have added it in my local code ..

Added one property in PhoneCall.cs

        public string ExtentionNumber


And added following line in public PhoneCall PlaceCall( PhoneCall call ) in TwilioRestClient.cs

settings.Add("SendDigits", call.ExtentionNumber);



Sep 28, 2010 at 11:29 PM

I agree that this would be an excellent enhancement.

As to exactly how to implement that in PhoneCall.cs, here is my immediate thinking, subject to change:

I want to make the interface as rich as possible for us, the people who use this code for our own applications. But I also don't want to confuse helpful new functionality with the Twilio API baseline code.

So I'm thinking of making PhoneCall a partial class, and adding a new directory called Extensions with a new PhoneCall.cs module. (Not to confuse code extensions with telephone extensions, but I'm sure you get the idea...) In there, we can add ExtensionNumber to another partial class for PhoneCall, as well as other customizations, without cluttering the implementation of the API.

Since we're here, I was reviewing how the TwilioRestClient.cs method overloads pass PhoneCall properties into "settings". More work is required in this area to make sure that anything we put into the object is really passed on to Twilio. 

Unless there is some disagreement with this approach, I'll work on this as a part of the v2 update to support the v2010 API.

I'll create IssueTracker items for everything that I'm working on so that I can close off items one by one. I encourage anyone using TSL.NET to create tracker items so that I don't miss implementing any of these valuable contributions.


Sep 29, 2010 at 7:36 AM

Thanks for the reply .. I also agree with your approach of implementation .

Looking forward for next release.

Thanks !