sinch-rtc

# callPhoneNumber

abstract fun callPhoneNumber(phoneNumber: String, cli: String?): Call

Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).

#### Return

A Call instance.

#### Parameters

phoneNumber

The phone number to call. The phone number should be given according to E.164 number formatting (http://en.wikipedia.org/wiki/E.164) and should be prefixed with a '+'. E.g. to call the US phone number 415 555 0101, it should be specified as "+14155550101", where the '+' is the required prefix and the US country code '1' added before the local subscriber number.

cli

Identifier of the caller.

#### Throws

IllegalStateException

If SinchClient is not started.

MissingPermissionException

If missing a permission required to place a call.

abstract fun callPhoneNumber(phoneNumber: String, cli: String?, callHeaders: Map<String, String>?): Call

Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).

#### Return

A Call instance.

#### Parameters

phoneNumber

The phone number to call. The phone number should be given according to E.164 number formatting (http://en.wikipedia.org/wiki/E.164) and should be prefixed with a '+'. E.g. to call the US phone number 415 555 0101, it should be specified as "+14155550101", where the '+' is the required prefix and the US country code '1' added before the local subscriber number.

cli

Identifier of the caller.

callHeaders

Headers to pass with the call.

#### Throws

IllegalStateException

If SinchClient is not started.

IllegalArgumentException

If the size of all headers strings exceeds 1024 bytes when encoded as UTF-8.

MissingPermissionException

If missing a permission required to place a call.