BelledonneCommunications / linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)

Home Page:http://linphone.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

asterisk and linphone config

jay928374293 opened this issue · comments

I have connected Linphone iOS app to my Asterisk server.
Outgoing calls are fine
Incoming calls result in a 488 not acceptable here from Linphone.

What is the correct configuration required on Asterisk 20 (pjsip) to receive calls on Linphone 5.2.0 ?
I have tried enabling/disabling ice, avpf, srtp in both ends without luck.
For other phone types we have ice disabled, and avpf, srtp, tls enabled.

Linphone log for declined incoing call:

2023-12-27 12:33:42:171 [linphone/belle-sip] MESSAGE channel [0x109f88000]: received [2316] new bytes from [TLS://sipserver.com:5061]:
INVITE sip:user@linphone:38127;transport=TLS;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf SIP/2.0
Via: SIP/2.0/TLS 1.2.3.4:5061;rport;branch=z9hG4bKPj4a129b9a-3e2a-4011-856d-06aa95776892;alias
From: "+123456" sip:+123456@1.2.3.4;tag=5e954582-9be5-467c-ba5f-daeed0f6eef3
To: sip:user@linphone;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf
Contact: sip:asterisk@1.2.3.4:5061;transport=TLS
Call-ID: 9c6a58ce-6ddf-480e-b2ee-700d33cef625
CSeq: 19431 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
X-Callee: 4778608287
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 854

v=0
o=- 1524420477 1524420477 IN IP4 1.2.3.4
s=Asterisk
c=IN IP4 1.2.3.4
t=0 0
a=group:BUNDLE audio-0
m=audio 25948 RTP/SAVP 107 8 0 9 101
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:D5X4GcYRMQOVLJiSX8AcHqaLxhlKp9e63FRT0GiY
a=crypto:2 AEAD_AES_128_GCM inline:r6dgxh9QuGGFsRlWtu0IC1lfGDVsizrna3A5yg==
a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:vT1elLY+9gRgTjcLHjtZHoWJ3bAFWfFxgG5DpgfNYlb84If2DuN9prIJD0lNCw==
a=crypto:4 AEAD_AES_256_GCM inline:TQRn1q5Garcja9DWVQeyPVDC3rAfyQSzhwVoILqZaWw/YKXudycEI+derxY=
a=rtpmap:107 opus/48000/2
a=fmtp:107 maxaveragebitrate=64000;useinbandfec=1;usedtx=1
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
a=rtcp-mux
a=ssrc:844501730 cname:098d38e7-82f1-498c-9ba2-306963b11e32
a=mid:audio-0

2023-12-27 12:33:42:316 [linphone/belle-sip] MESSAGE channel [0x109f88000] [1462] bytes parsed
2023-12-27 12:33:42:317 [linphone/belle-sip] MESSAGE channel [0x109f88000] read [854] bytes of body from [sipserver.com:5061]
2023-12-27 12:33:42:317 [linphone/bctbx] MESSAGE Background task belle-sip transaction(0x29cff4000) started. Unknown remaining time since application is not fully in background.
2023-12-27 12:33:42:317 [linphone/belle-sip] MESSAGE transaction [0x29cff4000]: starting transaction background task with id=[2d9].
2023-12-27 12:33:42:317 [linphone/belle-sip] MESSAGE Changing [server] [INVITE] transaction [0x29cff4000], from state [INIT] to [PROCEEDING]
2023-12-27 12:33:42:318 [linphone/belle-sip] MESSAGE channel [0x109f88000]: message sent to [TLS://sipserver.com:5061], size: [698] bytes
SIP/2.0 100 Trying
Via: SIP/2.0/TLS 1.2.3.4:5061;rport;branch=z9hG4bKPj4a129b9a-3e2a-4011-856d-06aa95776892;alias
From: "+123456" sip:+123456@1.2.3.4;tag=5e954582-9be5-467c-ba5f-daeed0f6eef3
To: sip:user@linphone;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf
Call-ID: 9c6a58ce-6ddf-480e-b2ee-700d33cef625
CSeq: 19431 INVITE
Content-Length: 0

2023-12-27 12:33:42:318 [linphone/belle-sip] MESSAGE New server dialog [0x28092e700] , local tag [PmgKk1l], remote tag [5e954582-9be5-467c-ba5f-daeed0f6eef3]
2023-12-27 12:33:42:318 [linphone/liblinphone] MESSAGE op [0x10f271000] : setOrUpdateDialog() current=[0x0] new=[0x28092e700]
2023-12-27 12:33:42:318 [linphone/liblinphone] MESSAGE New incoming call from ["+123456" sip:+123456@1.2.3.4] to [sip:user@linphone;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf]
2023-12-27 12:33:42:320 [linphone/liblinphone] MESSAGE Found payload opus/48000 fmtp=maxaveragebitrate=64000;useinbandfec=1;usedtx=1
2023-12-27 12:33:42:320 [linphone/liblinphone] MESSAGE Found payload PCMA/8000 fmtp=
2023-12-27 12:33:42:320 [linphone/liblinphone] MESSAGE Found payload PCMU/8000 fmtp=
2023-12-27 12:33:42:320 [linphone/liblinphone] MESSAGE Found payload G722/8000 fmtp=
2023-12-27 12:33:42:320 [linphone/liblinphone] MESSAGE Found payload telephone-event/8000 fmtp=0-16
2023-12-27 12:33:42:320 [linphone/liblinphone] MESSAGE Found: 4 valid crypto lines
2023-12-27 12:33:42:321 [linphone/liblinphone] MESSAGE Start measurement of [Get call log.].
2023-12-27 12:33:42:323 [linphone/liblinphone] MESSAGE Duration of [Get call log.]: 2ms.
2023-12-27 12:33:42:323 [linphone/liblinphone] MESSAGE New MediaSession [0x281db1668] initialized (liblinphone version: 5.3.1)
2023-12-27 12:33:42:325 [linphone/liblinphone] MESSAGE MainDb::addEvent() of type ConferenceCallStarted (value 3)
2023-12-27 12:33:42:326 [linphone/liblinphone] MESSAGE Insert new conference call in database: 9c6a58ce-6ddf-480e-b2ee-700d33cef625
2023-12-27 12:33:42:326 [linphone/liblinphone] MESSAGE Updating sip address display name in database: sip:+123456@1.2.3.4.
2023-12-27 12:33:42:326 [linphone/liblinphone] MESSAGE Insert new sip address in database: sip:user@linphone;pn-call-snd=notes_of_the_optimistic.caf;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-msg-snd=msg.caf;pn-msg-str=IM_MSG;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-silent=1;pn-timeout=0.
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Linphone core [0x10f022200] notified [call_log_updated]
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE CallSession [0x281db1668]: disabling video in our call params because the remote doesn't want it
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Rtp bundle is enabled.
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Local IP address guessed from SDP is: linphone
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Guessed media local ip address is linphone
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_32
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_80
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_32
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80 UNENCRYPTED_SRTCP
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80 UNENCRYPTED_SRTP
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80 UNENCRYPTED_SRTCP UNENCRYPTED_SRTP
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80 UNAUTHENTICATED_SRTP
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_32 UNAUTHENTICATED_SRTP
2023-12-27 12:33:42:344 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AEAD_AES_128_GCM
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AEAD_AES_256_GCM
2023-12-27 12:33:42:345 [linphone/liblinphone] WARNING [LIME] No account available, unable to setup identity key for ZRTP auxiliary shared secret
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Port 7228 randomly taken from range [ 7200 , 7299]
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE stream#0 [audio] in state [Stopped]: multicast role is [inactive]
2023-12-27 12:33:42:345 [linphone/ortp] MESSAGE RtpSession bound to [0.0.0.0] ports [7228] [7229]
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AEAD_AES_128_GCM
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AEAD_AES_256_GCM
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_80
2023-12-27 12:33:42:345 [linphone/liblinphone] MESSAGE Configured zrtp key agreement: 'MS_ZRTP_KEY_AGREEMENT_K255_KYB512'
2023-12-27 12:33:42:345 [linphone/mediastreamer] MESSAGE Creating ZRTP engine on rtp session [0x10ea8b200] ssrc 0x9557c058
2023-12-27 12:33:42:352 [linphone/ortp] MESSAGE rtp_session_enable_network_simulation:DISABLING NETWORK SIMULATION
2023-12-27 12:33:42:352 [linphone/ortp] WARNING Cname [sip:user@linphone;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf] too long for session [0x10ea8b200]
2023-12-27 12:33:42:352 [linphone/mediastreamer] MESSAGE Setting DSCP to 46 for MSAudio stream.
2023-12-27 12:33:42:352 [linphone/liblinphone] MESSAGE Created stream of type audio at index 0: stream#0 [audio] in state [Stopped]
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE Created new ICE check list 0x280a29d10 for stream #0
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE ICE state is IceStateInProgress for stream#0 [audio] in state [Stopped]
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE ICE state is IceStateNotActivated for stream#0 [audio] in state [Stopped]
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE [MS2AudioStream] setting type of soundcard 0x28113ad60 to voice
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE Call's input audio device is iPhone Microphone
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE [MS2AudioStream] setting type of soundcard 0x28113ad60 to voice
2023-12-27 12:33:42:353 [linphone/liblinphone] MESSAGE ICE state is IceStateNotActivated for stream#0 [audio] in state [Stopped]
2023-12-27 12:33:42:354 [linphone/liblinphone] MESSAGE Doing SDP offer/answer process of type incoming
2023-12-27 12:33:42:354 [linphone/liblinphone] MESSAGE Doing offer/answer processing with specific provider for codec [opus]
2023-12-27 12:33:42:354 [linphone/liblinphone] MESSAGE No match for telephone-event/8000/1
2023-12-27 12:33:42:354 [linphone/liblinphone] MESSAGE Found matching configurations: local configuration index 0 remote offered configuration index 0
2023-12-27 12:33:42:354 [linphone/liblinphone] ERROR Unable to retrieve contact address from op or account for call session 0x281db1668 (local address Address(sip:user@linphone;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf) remote address "+123456" sip:+123456@1.2.3.4).
2023-12-27 12:33:42:354 [linphone/liblinphone] WARNING Session [0x281db1668] will be declined:
2023-12-27 12:33:42:354 [linphone/liblinphone] WARNING - negotiated SDP is empty
2023-12-27 12:33:42:354 [linphone/liblinphone] WARNING - negotiated security is compatible with core settings
2023-12-27 12:33:42:355 [linphone/liblinphone] MESSAGE MainDb::addEvent() of type ConferenceCallStarted (value 3)
2023-12-27 12:33:42:356 [linphone/liblinphone] WARNING Cannot add ConferenceCallStarted event as conference call is already stored in db for call-id: 9c6a58ce-6ddf-480e-b2ee-700d33cef625
2023-12-27 12:33:42:356 [linphone/liblinphone] ERROR MainDb::addEvent() of type ConferenceCallStarted failed.
2023-12-27 12:33:42:356 [linphone/ios] MESSAGE Mark call 9c6a58ce-6ddf-480e-b2ee-700d33cef625 as declined.
2023-12-27 12:33:42:356 [linphone/liblinphone] MESSAGE Linphone core [0x10f022200] notified [call_log_updated]
2023-12-27 12:33:42:356 [linphone/belle-sip] MESSAGE channel [0x109f88000]: message sent to [TLS://sipserver.com:5061], size: [838] bytes

SIP/2.0 488 Not acceptable here
Via: SIP/2.0/TLS 1.2.3.4:5061;rport;branch=z9hG4bKPj4a129b9a-3e2a-4011-856d-06aa95776892;alias
From: "+123456" sip:+123456@1.2.3.4;tag=5e954582-9be5-467c-ba5f-daeed0f6eef3
To: <sip:user@linphone;pn-prid=89926C30614A1B3EA32B9E1CC0DF2B316C005C4693AAB77C9613D90F91ED499F:voip&8C2A23354A1980042E6AA4092CD21B2BAEB53E5D1A8170BBE19F16A27F76728F:remote;pn-provider=apns;pn-param=ABCD1234.org.linphone.phone.voip&remote;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-