I am using Freeswitch as an SBC behind Kamailio, and my external calls are routed via freeswitch. In those calls the music on hold works as it is handled by freeswitch. Ideally I would like to somehow redirect when a call is put on hold to the MOH extension. The other option is by using rtpproxy. I could not find any documentation on rtpproxy and would really appreciate it if someone could lead me to it or give me a brief overview on how to go about using rtpproxy_stream2uac to play music whenever a call is put on hold.
On Wed, Dec 21, 2011 at 4:50 AM, Daniel-Constantin Mierla <mico...@gmail.com > wrote: > Hello, > > > On 12/21/11 7:49 AM, Olle E. Johansson wrote: > >> 20 dec 2011 kl. 22:40 skrev Gautam Batra: >> >> Hi, >>> >>> Thanks for your replies. Is it possible to play an audio file in the >>> case of a re-invite directly from kamailio instead of freeswitch by using >>> rtpproxy_stream2uac() or something similar? >>> >> Kamailioi is still a proxy and from the endpoint point of view is not >> involved in the media plane. If you managed to do that many >> endpoints would ignore the packets or see them as a DOS attack attempt. >> Other endpoints might just play them. >> In later releases of Asterisk, we lock to the IP address of the peer and >> would ignore these. Asterisk used to send music-on-hold >> like this before, but we considered it a security issue and started >> reinviting to make Asterisk involved in the call again to play >> music on hold. Asterisk can do that, because it's a b2bua and is an >> endpoint in the call. Kamailio can't initiate a reinvite in the >> call. >> > indeed, kamailio cannot initiate re-invites. You can play an audio file > via rtpproxy and rtpproxy_stream2uac() if you use rtpproxy relaying from > the beginning of the call. Otherwise, use a sip b2bua which does signaling > only until you need to play audio and do re-invites so it gets in media > path. > > Besides Asterisk or FreeSWITCH, a lightweight b2bua that probably offers > such functionality is sems (sip express media server) -- I CC-ed Stefan, he > can confirm and even give some leads of how to do it. > > Cheers, > Daniel > >> >> /O >> >>> Gautam >>> >>> On Mon, Dec 12, 2011 at 4:50 AM, Olle E. Johansson<o...@edvina.net> >>> wrote: >>> >>> 12 dec 2011 kl. 10:45 skrev Daniel-Constantin Mierla: >>> >>> Hello, >>>> >>>> On 12/9/11 9:04 PM, Gautam Batra wrote: >>>> >>>>> Hello, >>>>> >>>>> I have a kamailio sip proxy server with freeswitch acting as SBC. I >>>>> want to redirect the call to freeswitch when hold is pressed so that i can >>>>> play music on hold. I tried this by using rewritehostport in case of a >>>>> re-invite, but the call drops in that case. Could someone please help me >>>>> with this? >>>>> >>>> it is not possible to redirect established calls (it breaks the >>>> RFC3261), you have to route the call through freeswitch from its start. >>>> Perhaps you can use freeswitch without relaying the media in first place >>>> and when you have on hold, you set media patch to go through freeswitch. >>>> >>> The only solution is having FreeSwitch send an invite with replaces to >>> grab the call. The question is how to get it back. >>> >>> /O >>> >>> >>> --- >> * Olle E Johansson - o...@edvina.net >> * Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden >> >> >> >> >> ______________________________**_________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >> sr-users@lists.sip-router.org >> http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**users<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users> >> > > -- > Daniel-Constantin Mierla -- http://www.asipto.com > http://linkedin.com/in/miconda -- http://twitter.com/miconda > >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users