iphone - CTTelephonyCenterAddObserver Private API not receiving disconnected event when call is connected and duration of call is more than 5/6 sec -
i using cttelephonycenteraddobserver(ct, null, callback, null, null, cfnotificationsuspensionbehaviorhold);
log phone calls.
here code of call method
static void callback(cfnotificationcenterref center, void *observer, cfstringref name, const void *object, cfdictionaryref userinfo) { nsstring *notifyname=(nsstring *)name; if ([notifyname isequaltostring:@"kctcallstatuschangenotification"]) { nsdictionary *info = (nsdictionary*)userinfo; nsstring *state=[[info objectforkey:@"kctcallstatus"] stringvalue]; nslog(@"call status changed = %@",state); if ([state isequaltostring:@"5"]){//disconnect nslog(@"unanswered:%@",state); } if ([state isequaltostring:@"3"]){//outgoing nslog(@"outgoing calls:%@",state); } if ([state isequaltostring:@"1"]){//connected //call connected } callstate=[state intvalue]; } }
i receiving call events/states without issue in callback method. there problem disconnected state (5). problem when connected call disconnected , duration of call more 5/6 sec disconnected (5) state not received in callback method.
has else faced same issue , found solution of issue?
Comments
Post a Comment