0

In the console from the log I'm able to see this


Allow: INVITE, ACK, CANCEL, BYE, PRACK, NOTIFY, REFER, SUBSCRIBE, OPTIONS, UPDATE

Contact: sip:XX.XX.X.XX

User-Agent: OmniPCX Enterprise R12.2 m3.402.13.f

P-Asserted-Identity: "DECT ..." <sip:XXXX@XX.XX.X.XX;user=phone>

Content-Type: application/sdp

To: sip:XXXX@XX.XX.X.XX;tag=a3ef45246414e20856fd6bfb20568c10

From: <sip:XXXX@XX.XX.X.X>;tag=B~P1rZSRu

Call-ID: 5oUca3vuOS

CSeq: 20 INVITE

Via: SIP/2.0/TCP XX.XX.X.XX:53457;branch=z9hG4bK.JVPO2BLrH;rport

Content-Length: 212

I want to get P-Asserted-Identity because there is saved displayName, so in outgoing call I want to replace number with identity once I'll receive this information.

In Swift I have this

mCoreDelegate = CoreDelegateStub( onCallStateChanged: { (core: Core, call: Call, state: Call.State, message: String) in

})

But I have no idea also there is no mention in documentation how can I read those data which are saved in header from SIP.

I tried, but only nil has been return

call.currentParams?.getCustomHeader(headerName: "P-Asserted-Identity"))

2 Answers2

0

This one solve my problem

call.remoteParams?.getCustomHeader(headerName: "P-Asserted-Identity")
0

Current params are the negociated session parameters. Remote params hold the parameters of the remote end of the call, that's why the P-Asserted-Identity header is there.

See the documentation: https://download.linphone.org/releases/docs/liblinphone/latest/swift/Classes/Call.html#/s:10linphonesw4CallC12remoteParamsAA0bD0CSgvp

Viish
  • 434
  • 4
  • 12