How can we handle multiple calls with pjsip and callkit

家住魔仙堡 提交于 2019-12-04 10:50:44

While accepting the call please fulfill the held action to make sure callkit hold the current call. That will enable Swap call button.

Don't forget to enable following stuffs for CXCallUpdate :

update.supportsHolding = YES;
update.supportsGrouping = NO;
update.supportsUngrouping = NO;



 -(void)provider:(CXProvider *)provider performSetHeldCallAction:(CXSetHeldCallAction *)action{
               if (action.onHold) {
                    [callForHold holdCurrentCall];
                }else{
                    [callForHold unHoldCurrentCall];
                }

            [action fulfill];
        }

Above is the code for hold. don't forget to do [action fulfill]

When you click on swap button , CXHeldCall will be triggered 2 times :

  • One call to be hold (Find the call object from callUUID of action and hold that call)
  • Second Call to be Unhold (Find the call object from callUUID of action and unhold that call)

Cheers ;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!