aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-07-20 20:43:15 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-22 18:21:56 +0200
commitc7e49d35eafe74b3cdbfb5ae12104c6b3d33a02e (patch)
treebeec9c463064e83dc6ad7dd12121f10155268d4a /openbsc/src/libmgcp
parent06c9da6c22f674c86e16e1c4dde9932a49b8cbea (diff)
mgcp: FreeSWITCH requiresn us to provide the o= and t= param
The SDP file for FreeSWITCH should contain o= (Origin) and the t= (Timing) for the session. The data of the Origin should be globally unique but this is not the case yet. We will need to store the (NTP) time of the creation of the endpoint.
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 44a3b87ff..a81c42211 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -181,12 +181,14 @@ static struct msgb *create_response_with_sdp(struct mgcp_endpoint *endp,
snprintf(sdp_record, sizeof(sdp_record) - 1,
"I: %u\n\n"
"v=0\r\n"
+ "o=- %u 23 IN IP4 %s\r\n"
"c=IN IP4 %s\r\n"
+ "t=0 0\r\n"
"m=audio %d RTP/AVP %d\r\n"
"a=rtpmap:%d %s\r\n",
- endp->ci, addr, endp->net_end.local_port,
- endp->bts_end.payload_type, endp->bts_end.payload_type,
- endp->tcfg->audio_name);
+ endp->ci, endp->ci, addr, addr,
+ endp->net_end.local_port, endp->bts_end.payload_type,
+ endp->bts_end.payload_type, endp->tcfg->audio_name);
return mgcp_create_response_with_data(200, " OK", msg, trans_id, sdp_record);
}