SUBSCRIBE
Hello i had implemented voip calls via linphone sdk lates version i wanna implement BLF (Busy Here) have one way to do it with linphone-sdk is SUBSCRIBE to number to observe it. problem is that device sent send subscribe getting response back from server for verification and linphone doesn't response with credentials to the server
here is implementation:
'
func createSubscribtion() {
do {
let identity = try mCore.createAddress(address: String("sip:" + "here number" + "@" + domain))
let subscription = try mCore.createSubscribe(resource: identity, event: "dialog", expires: 1000)
subscription.addCustomHeader(name: "Accept", value: "application/dialog-info+xml")
try subscription.sendSubscribe(body: nil)
} catch {debugPrint("Transfeing (error.localizedDescription)")}
}
'
here is delegate: STATE INFINITELY PROGRESS
'extension CallCoreManager: CoreDelegate { func onSubscriptionStateChanged(core: Core, linphoneEvent: Event, state: SubscriptionState) { switch state { case .None: debugPrint("None") case .OutgoingProgress: debugPrint("Outgoing proggress") case .IncomingReceived: debugPrint("Incomming received") case .Pending: debugPrint("Pending") case .Active: debugPrint("Active") case .Terminated: debugPrint("Terminated") case .Error: debugPrint("Error") case .Expiring: debugPrint("Expired") } }
func onNotifyReceived(core: Core, linphoneEvent: Event, notifiedEvent: String, body: Content) {
debugPrint(linphoneEvent.name)
}
}'
Here is the DEBUG LOG:
2022-02-01 23:35:48:898 liblinphone-message-Skipping top route of initial route-set because same as request-uri 2022-02-01 23:35:48:899 bctbx-message-Background task belle-sip transaction(0x600003ad1080) started. Unknown remaining time since application is not fully in background. 2022-02-01 23:35:48:899 belle-sip-message-transaction [0x600003ad1080]: starting transaction background task with id=[19]. 2022-02-01 23:35:48:900 belle-sip-message-Changing [client] [SUBSCRIBE] transaction [0x600003ad1080], from state [INIT] to [TRYING] 2022-02-01 23:35:48:900 belle-sip-message-channel [0x7f8d5dae0000]: message sent to [UDP://"here is my pbx"], size: [533] bytes SUBSCRIBE sip:TO ADDRESS SIP/2.0 Via: SIP/2.0/UDP 192.168.0.2:63292;branch=z9hG4bK.um9UDe6NQ;rport From: <sip:MY ADDRESS>;tag=IibXw53LT To: sip: DESTINATION ADDRESS CSeq: 20 SUBSCRIBE Call-ID: C0qFFNxq3o Max-Forwards: 70 Supported: replaces, outbound, gruu, dialog Event: dialog Expires: 1000 Contact: <sip:"HERE CONTACT";gr=urn:uuid:58426657-3ab7-00e5-a851-5a7b85ca80cb> Accept: application/dialog-info+xml User-Agent: Unknown
2022-02-01 23:35:48:900 liblinphone-message-LinphoneEvent [0x600003ad0840] moving to subscription state LinphoneSubscriptionOutgoingProgress "Outgoing proggress" 2022-02-01 23:35:49:071 bctbx-message-Background task belle-sip recv channel started. Unknown remaining time since application is not fully in background. 2022-02-01 23:35:49:071 belle-sip-message-channel [0x7f8d5dae0000]: starting recv background task with id=[1a]. 2022-02-01 23:35:49:072 belle-sip-message-channel [0x7f8d5dae0000]: received [486] new bytes from [UDP://"HERE MY PBX":5060]: SIP/2.0 407 Proxy Authentication Required Via: SIP/2.0/UDP 192.168.0.2:63292;branch=z9hG4bK.um9UDe6NQ;rport=63292;received=192.168.0.2 From: <sip:FROM MY ADDRESS>;tag=IibXw53LT To: sip:DESTINATION ADDRESS;tag=49f23af224cb9cd3aee04282a07a2815.e66a CSeq: 20 SUBSCRIBE Call-ID: C0qFFNxq3o Proxy-Authenticate: Digest realm="my pbx", nonce="Yfmo4WH5p7V3O3BWU7knqlcNJqQfF+sR" Server: Enswitch SIP proxy Content-Length: 0
2022-02-01 23:35:49:075 belle-sip-message-channel [0x7f8d5dae0000] [486] bytes parsed 2022-02-01 23:35:49:076 belle-sip-message-Found transaction matching response. 2022-02-01 23:35:49:076 belle-sip-message-Changing [client] [SUBSCRIBE] transaction [0x600003ad1080], from state [TRYING] to [COMPLETED] 2022-02-01 23:35:49:076 liblinphone-message-Op [0x7f8d5b8972a0] is terminated, nothing to do with this [407] 2022-02-01 23:35:49:077 belle-sip-message-channel [0x7f8d5dae0000]: ending recv background task with id=[1a]. 2022-02-01 23:35:52:011 belle-sip-message-channel [0x7f8d5dae0000]: keep alive sent to [UDP://MY PBX:5060] 2022-02-01 23:35:54:090 belle-sip-message-Changing [client] [SUBSCRIBE] transaction [0x600003ad1080], from state [COMPLETED] to [TERMINATED] 2022-02-01 23:35:54:091 belle-sip-message-Client SUBSCRIBE transaction [0x600003ad1080] terminated 2022-02-01 23:35:54:092 liblinphone-message-Destroying op [0x7f8d5b8972a0] of type [SalOpUnknown] 2022-02-01 23:35:54:092 belle-sip-message-transaction [0x600003ad1080]: ending transaction background task with id=[19]. 2022-02-01 23:35:54:093 belle-sip-message-Transaction [0x600003ad1080] deleted
All bold text i hidden my sip server and sips , in this so after deleted nothing happening any more
Problem that Android device work perfect with the same implementation identity same, but IOS not responding to the server with credentials PLEASE HELP