|
From: | Laurent Brard |
Subject: | [Linphone-developers] linphone abnormal exit and fix proposal |
Date: | Thu, 1 Dec 2005 12:23:17 +0100 |
Hi, I am testing linphone with various SIP phones and it exits when calling or
called by a PABX/Gateway that sends the “telephone-event” payload first in
the sdp descriptor: - Calling: INVITE sip:address@hidden:5060
SIP/2.0 Record-Route: <sip:10.0.0.132;lr=1> Supported: replaces,100rel User-Agent: ABS GW v5.1.0 To: " " <sip:address@hidden> From: "Poste 7132" <sip:address@hidden>;tag=9e06425b2f3fc5d66e0ef93de2815d64 Contact: <sip:10.0.0.132:6060;transport=tcp> Content-Type: application/sdp Call-ID: address@hidden CSeq: 529507970 INVITE Via: SIP/2.0/udp 10.0.0.132;branch=z9hG4bK48de2fe45128c06b2fac6af997795bced5c26a551e9a8a9797bf76ff1b42ef4e Via: SIP/2.0/tcp 10.0.0.132:6060;branch=z9hG4bK208c26be3339d28d29ff9e6a1a76767d Max-Forwards: 69 Content-Length: 235 Session-Expires: 1800 v=0 o=default 1133434445 1133434445 IN IP4 10.0.0.132 s=abs c=IN IP4 10.0.0.133 t=0 0 m=audio 32712 RTP/AVP 97 4 8 0 a=sendrecv a=rtpmap:97
telephone-event/8000 a=rtpmap:4
G723/8000 a=rtpmap:8
PCMA/8000 a=rtpmap:0
PCMU/8000 - Called: SIP/2.0 200 OK Record-Route: <sip:10.0.0.132;lr=1> Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,SUBSCRIBE,OPTIONS Contact: <sip:10.0.0.132:6060;transport=tcp> Supported: replaces,100rel User-Agent: ABS GW v5.1.0 Content-Type: application/sdp To: <sip:address@hidden>;tag=6bc77b029f61df88040b218b75fdf50d From: <sip:address@hidden>;tag=2041724643 Call-ID: address@hidden CSeq: 20 INVITE Via: SIP/2.0/UDP 10.0.0.136:5060;rport;branch=z9hG4bK1187813012 Content-Length: 200 v=0 o=default 1133434572 1133434573
IN IP4 10.0.0.132 s=A conversation c=IN IP4 10.0.0.133 t=0 0 m=audio 32720 RTP/AVP 101 8 a=rtpmap:101
telephone-event/8000 a=rtpmap:8
PCMA/8000 a=sendrecv Looking at RFC 2327 page 20,
it says: “ When a list of payload
formats is given, this implies that all of these formats may be used in the session, but the first of
these formats is the default format for the session.” So it looks like the PABX/gateway
should not do this. Still, linphone exits while it
should either accept or reject the message. So I have changed linphone_payload_is_supported, linphone_read_audio_answer
and linphone_read_audio_answer in exeevents.c
to skip the “telephone-event” payload when looking for a codec: diff exeevents-origin.c linphone/coreapi/exevents.c 477,479c477 <
/* return 1 if supported and valid codec, <
2
if supported but not a valid codec (telephone events) */ <
return (strcmp(rtppayload->mime_type,"telephone-event")!=0) ? 1 : 2; --- >
return 1; 503,506d500 < /* if payload is
supported but not a valid codec, skip it */ < if
(supported == 2) { <
return 0; < } 570,573d563 < /* if payload is
supported but not a valid codec, skip it */ < if
(supported == 2) { <
return 0; < } This might not be the
best fix, but I think Linphone should better handle this case (other
implementations do). Laurent Brard |
[Prev in Thread] | Current Thread | [Next in Thread] |