FSClient.Account.CreateCall C# (CSharp) Method

CreateCall() public method

public CreateCall ( String number ) : void
number String
return void
        public void CreateCall(String number)
        {
            if (!enabled)
                return;
            String var_str = "origination_caller_id_name='" + caller_id_name + "',origination_caller_id_number='" + caller_id_number + "'";
            if (secure_media)
                var_str += ",sip_secure_media=true";

            if (Broker.get_instance().DirectSipDial){
                if (sip_regex == null)
                    sip_regex = new Regex(@"^sip:(.+)$",RegexOptions.Compiled);
                Match match = sip_regex.Match(number);
                if (match.Success){
                    string sip_uri = match.Groups[1].Value;
                    PortAudio.Call("{" + var_str + ",gw_ref='" + gateway_id + "'}sofia/softphone/" + sip_uri);
                    return;
                }
            }
            PortAudio.Call("{" + var_str + "}sofia/gateway/" + gateway_id + "/" + number);
        }

Usage Example

Example #1
0
 public void DialString(Account account, String str)
 {
     account.CreateCall(str);
 }
All Usage Examples Of FSClient.Account::CreateCall