Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
CTCall: Difference between revisions - iPhone Development Wiki

CTCall: Difference between revisions

From iPhone Development Wiki
(Created page with "'''CTCall''' is a set of APIs in CoreTelephony.framework that is used to achieve various things related to phone calls. == Initiating a call == To initiate a call without...")
 
mNo edit summary
Line 18: Line 18:
The CTCallHold, CTCallResume and CTCallDisconnect (end the call) can be used to hold call, resume a held call and end a call, respectively.
The CTCallHold, CTCallResume and CTCallDisconnect (end the call) can be used to hold call, resume a held call and end a call, respectively.


* '''Note''': The phone number passed to CTCallDial must be normalized. For example, +1 (555) 555-5555 will become 15555555555 after normalization. You can use the [[CPPhoneNumber|CPPhoneNumberCopyNormalized]] to normalize.
* '''Note''': The phone number passed to CTCallDial must be normalized. For example, +1 (555) 555-5555 will become 15555555555 after normalization. You can use the [[CPPhoneNumber|CPPhoneNumberCopyNormalized]] function to normalize.


== References ==  
== References ==  

Revision as of 19:21, 9 May 2013

CTCall is a set of APIs in CoreTelephony.framework that is used to achieve various things related to phone calls.

Initiating a call

To initiate a call without using MobilePhone, you can use the CTCallDial function.

CFStringRef number = CFSTR("15555555555");
CTCallRef call = CTCallDial(number);
...
CTCallHold(call);
...
CTCallResume(call);
...
CTCallDisconnect(call);

The CTCallHold, CTCallResume and CTCallDisconnect (end the call) can be used to hold call, resume a held call and end a call, respectively.

  • Note: The phone number passed to CTCallDial must be normalized. For example, +1 (555) 555-5555 will become 15555555555 after normalization. You can use the CPPhoneNumberCopyNormalized function to normalize.

References