Try the following example. Change connection IP and codec order accordingly.
if (is_method("INVITE") && has_body("application/sdp")) {
$var(Session_owner) = $rb[1];
append_to_reply("Content-Type:
application/sdp\r\nv=0\r\n$var(Session_owner)\r\ns=call\r\nc=IN IP4
10.130.130.114\r\nt=0 0\r\nm=audio 61896 RTP 0 8 3 101\r\na=rtpmap:0
pcmu/8000\r\na=rtpmap:8 pcma/8000\r\na=rtpmap:3 gsm/8000\r\na=rtpmap:101
telephone-event/8000\r\na=fmtp:101 0-16\r\na=ptime:20\r\na=sendrecv\r\n")';
t_reply_with_body("183", "Session Progress", "$var(body)");
}
Hamid R. HashmiSoftware Engineer - VoIPVopium A/S
Date: Wed, 6 Jan 2016 20:33:29 +0300
From: [email protected]
To: [email protected]
Subject: [OpenSIPS-Users] Generating 183 reply and Playing Early Media using
rtpproxy_stream2uac()
Dear Users,I have a scenario where I want to Play an announcement as early
media to the UAC before answering the call but I don't want to use any media
server like asterisk/Freeswitch.
When user agent sends an INVITE I am calling rtpproxy_offer() and sending
INVITE to B party. On 100 Trying from B party I am calling
rtpproxy_stream2uac() and streaming the file I can see that RTPs are going
towards the UAC (caller) but softphone is not accepting those RTPs because 183
was not sent to the softphone so he don't know the media details of the
rtpproxy. but as 200 Ok reaches to the softphone last part of the audio can be
heard immediately after Answer.
So I think on 100 Trying from B Part if I send 183 Session Progress to the
softphone and then starting the RTP stream will work. So can you please tell me
is there a way to generate 183 Session Progress with media details of RTPPROXY
in opensips ? so that my scenario starts work.
Regards,Husnain TaseerVoIP Developer
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users