linphone-sdk icon indicating copy to clipboard operation
linphone-sdk copied to clipboard

Incoming message "From" header issues

Open osering opened this issue 2 years ago • 2 comments

Hello! Some messaging issues were identified:

  1. Linphone always cuts off domain part of "From" header (sender);

  2. When, according to RFC3261 (SIP), Section 20.20 "From", which refers to Section 20.10 "Contact", URI is "extended" like this From: "A. G. Bell" <sip:[email protected]>, there is problem.

a) when "sip:" is skipped, it looks OK. linp1

b) when "sip:" is NOT skipped, it cuts off contact and shows protocol "sip:" which in sip client software seems to be not necessary. linp2

  1. Message disappears (do not arrive) when there is "@" in the "From" header URI (put by Asterisk, for example)

  2. "From" header in messages list is always duplicated. It shows up both - in messages' bigger font first (sender) line (where it should be) and as the beginning of the message body, separated with ":" from message body. Instead, this space there could be good place to show arrival time

osering avatar May 09 '23 11:05 osering

Hi,

Please attach logs for points 1 and 2.

Regarding point 3, Asterisk is known to put wrong "From" and "To" headers using IPs instead of SIP identity, so yes it does causes the conversation list to be empty. You can workaround that by toggling off the last two settings of the "Chat" section of the parameters.

Finally, for point 4, this has already been improved in release/5.1 branch for 5.1.0 release to come.

Cheers,

Viish avatar May 09 '23 12:05 Viish

Hello! Thanks for prompt answer.

Just got log by: adb pull /data/data/org.linphone/files/linphone2.log

Problem#1 Message usually arrives, but always cuts off URI domain part "@olo-tst" of sip "From" header (Baresip-studio, Sipnetic, Zoiper shows it). In calls "From" URI domain part is shown. sipn1

MESSAGE sip:dongle1%20a%c4%81u%c5%ab%20%3cussd/1%3e@olo-tst SIP/2.0 Via: SIP/2.0/TLS 10.2.0.2:39906;branch=z9hG4bK.hbTOMUBBp;rport From: sip:os***@sip.antisip.com;tag=I0JhaMdt0 To: sip:dongle1%20a%c4%81u%c5%ab%20%3cussd/1%3e@olo-tst CSeq: 20 MESSAGE Call-ID: gg2V2gHHH4 Max-Forwards: 70 Route: <sip:sip.antisip.com:9091;transport=tls;lr> Supported: replaces, outbound, gruu, path, record-aware Date: Thu, 11 May 2023 15:53:29 GMT Content-Encoding: deflate Content-Type: message/imdn+xml Content-Length: 201 Priority: non-urgent User-Agent: LinphoneAndroid/5.0.10 (MI 9) LinphoneSDK/5.2.50 (tags/5.2.50^0)

Problem#3 When another "@" is put in URI, message does not arrive at all.

This is log excerpt in case when call did not show up (in baresip-studio, zoiper, sipnetic - it did):

2023-05-11 15:08:25:830 [org.linphone/belle-sip] ERROR header_from parser error for [From:"dongle1" <sip:+37167896789@1>;tag=0008716d-abba-433d-bca2-c5e3b0bfba66] 2023-05-11 15:08:25:835 [org.linphone/belle-sip] ERROR Missing mandatory header [From] for message [INVITE]

So you never see character "@" in the "From" URI.

P.S. This time artifact described as Problem#2 was not observed. Glad for fixing Problem#4.

osering avatar May 11 '23 18:05 osering