client: fix sdp parameter ordering
The parameter ordering of the client responses does not match the ordering as proposed by by RFC2327, Chapter 6. SDP Specification - reorder generated SDP parameters so that they match RFC2327 Change-Id: I63cac2ebc982ffead92703c22bf68c7aafa7936c
This commit is contained in:
parent
c3cfae2cf8
commit
b759473d10
|
@ -889,9 +889,6 @@ struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg)
|
|||
/* Add SDP protocol version */
|
||||
rc += msgb_printf(msg, "v=0\r\n");
|
||||
|
||||
/* Add session name (none) */
|
||||
rc += msgb_printf(msg, "s=-\r\n");
|
||||
|
||||
/* Determine local IP-Address */
|
||||
if (osmo_sock_local_ip(local_ip, mgcp->actual.remote_addr) < 0) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
|
@ -904,6 +901,9 @@ struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg)
|
|||
rc += msgb_printf(msg, "o=- %x 23 IN IP4 %s\r\n",
|
||||
mgcp_msg->call_id, local_ip);
|
||||
|
||||
/* Add session name (none) */
|
||||
rc += msgb_printf(msg, "s=-\r\n");
|
||||
|
||||
/* Add RTP address and port */
|
||||
if (mgcp_msg->audio_port == 0) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
|
@ -918,12 +918,13 @@ struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg)
|
|||
return NULL;
|
||||
}
|
||||
rc += msgb_printf(msg, "c=IN IP4 %s\r\n", mgcp_msg->audio_ip);
|
||||
rc +=
|
||||
msgb_printf(msg, "m=audio %u RTP/AVP 255\r\n",
|
||||
mgcp_msg->audio_port);
|
||||
|
||||
/* Add time description, active time (SDP) */
|
||||
rc += msgb_printf(msg, "t=0 0\r\n");
|
||||
|
||||
rc +=
|
||||
msgb_printf(msg, "m=audio %u RTP/AVP 255\r\n",
|
||||
mgcp_msg->audio_port);
|
||||
}
|
||||
|
||||
if (rc != 0) {
|
||||
|
|
|
@ -44,11 +44,11 @@ I: 11
|
|||
M: sendrecv
|
||||
|
||||
v=0
|
||||
s=-
|
||||
o=- 2f 23 IN IP4 127.0.0.1
|
||||
s=-
|
||||
c=IN IP4 192.168.100.23
|
||||
m=audio 1234 RTP/AVP 255
|
||||
t=0 0
|
||||
m=audio 1234 RTP/AVP 255
|
||||
|
||||
Generated DLCX message:
|
||||
DLCX 3 23@mgw MGCP 1.0
|
||||
|
|
Loading…
Reference in New Issue