<div dir="ltr">Hi, sorry, my previus answer wasn't clear enough - was writing it in a very sleepy mood :)<br><br>No, kamailio acts as a full proxy server for websocket and SIP. P2P is for caruzdias's configuration from github.<br>You can try following this <a href="http://nil.uniza.sk/sip/kamailio/configuring-kamailio-4x-websocket">http://nil.uniza.sk/sip/kamailio/configuring-kamailio-4x-websocket</a> guide for editing your current configuration file to support WebRTC. But as I said, you can face some problems with NAT-traversal, so you may to create different routes for ws and simple SIP.<br>Also, if you use Asterisk - make sure your version doesn't have some problems with understanding SRTP handshake (RTP/SAVPF) - be sure that you have last stable version of your branch (my colleague spent 3 days to figure out that there was a bug in his version). However, even after update we couldn't perform a transparent proxy for SRTP, so I used rtpengine with such scheme:<br><br>1. On each registration user's proto is stored in redis database<br>2. When rtpengine is being called, Kamailio checks user's proto<br>    a) If user is WS and is incoming call, dispatch him to media relay with RTP/AVP flag<br>    b) If user is WS and is outgoing call (from media relay) send it to the endpoint with RTP/SAVPF flag<br>    c) If user is SIP and is incoming call, dispatch it to media-relay with RTP/AVP flag (some SIP clients also have SRTP turned on by default)<br>    d) If user is SIP and is outgoing call, send it to endpoint without any RTP flags (most sipphones ca recognize which traffic is incomig)<br><br>This configurations works well both with Asterisk and Freeswitch, but Freeswitch in my practice can provide more concurent calls for lesser cost.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-13 22:24 GMT+03:00 Murugan Pandian <span dir="ltr"><<a href="mailto:manpower13.cse@gmail.com" target="_blank">manpower13.cse@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">HI Alexandru,<div><br></div><div>        i try to connect like this</div><div>                                                                                                              !--Freeswitch(IVR,Callcenter,dialplan,sip auth)</div><div>                         Browser(chrome,firefox,opera)--(WS)--->Kamailio--->!</div><div>                                                                                                              !--Freeswitch(IVR,Callcenter,dialplan,sip auth)</div><div><br></div><div>    i understand Kamailio only handling signalling(using websocket) but stream goes to peer-to-peer ,But i need to play ivr and handle callcenter (freeswitch)</div><div><br></div><div>       so here i try to kamailiio act proxy server </div><div><br></div><div>  Any idea how i can achieve thid</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 14, 2015 at 12:24 AM, Alexandru Covalschi <span dir="ltr"><<a href="mailto:568691@gmail.com" target="_blank">568691@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Well, I performed that by creating a media relay consisting of 2 freeswitches and using rtpengine. <br><br></div>You just need to handle WebRTC by kamailio using kamailio websocket module:<br><a href="http://kamailio.org/docs/modules/4.3.x/modules/websocket.html" target="_blank">http://kamailio.org/docs/modules/4.3.x/modules/websocket.html</a><br>caruzdias-es configuration helped me a lot in understanding how websockets work on Kamailio:<br><a href="https://github.com/caruizdiaz/kamailio-ws" target="_blank">https://github.com/caruizdiaz/kamailio-ws</a><br></div><div>But be aware, this configuration is for peer2peer connections, not for dispatching!<br></div><div><br></div><div>Kamailio will send simple SIP packets to the media relay then.<br></div><div><br></div><div>Also I used different NAT-traversal mechanism for sip and ws traffic (different routes based on client's transport protocol).<br></div><div>Also
 you'll maybe need to have different rtpengine flags for sip and ws - 
remember that WebRTC MUST have SRTP, but I had some issues in 
transfering the SRTP handshake in 
sipphone<-->kamailio<-->freeswitch scheme, so on webrtc 
connection my "incoming" rtpengine had RTP/AVP flag, and on outgoing 
webrtc it MUST have RTP/SAVP<br></div><div>For usual SIP calls I also conveted everything to RTP/AVP.<br></div><div><br></div><div>So you'll need to know to which type of user - ws or tcp/udp you're calling to understand which type of RTP to send them.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-13 19:07 GMT+03:00 Murugan Pandian <span dir="ltr"><<a href="mailto:manpower13.cse@gmail.com" target="_blank">manpower13.cse@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">it's posible dispatching websocket request?<div><br></div><div>I am try to connect browser(WebRTC) to sip-phone and vice versa,How i can achieve more concurrent call(more then 1000 call)</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sat, Jun 13, 2015 at 8:49 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div style="background-color:rgb(255,255,255);line-height:initial">                                                                                      <div style="width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">That question is difficult to answer without some elaboration on your part as to what you want to achieve.</div>                                                                                                                                     <div style="width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)"><br style="display:initial"></div>                                                                                                                                     <div></div>                                                              <div style="font-size:initial;font-family:Calibri,'Slate Pro',sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">--<br>Alex Balashov | Principal | Evariste Systems LLC<br>303 Perimeter Center North, Suite 300<br>Atlanta, GA 30346<br>United States<br><br>Tel: <a href="tel:%2B1-800-250-5920" value="+18002505920" target="_blank">+1-800-250-5920</a> (toll-free) / <a href="tel:%2B1-678-954-0671" value="+16789540671" target="_blank">+1-678-954-0671</a> (direct)<br>Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" target="_blank">http://www.csrpswitch.com/</a><br><br>Sent from my BlackBerry.</div>                                                                                                                                                                                  <table style="background-color:white;border-spacing:0px" width="100%"> <tbody><tr><td colspan="2" style="font-size:initial;text-align:initial;background-color:rgb(255,255,255)">                           <div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0in 0in;font-family:Tahoma,'BB Alpha Sans','Slate Pro';font-size:10pt">  <div><b>From: </b>Murugan Pandian</div><div><b>Sent: </b>Saturday, June 13, 2015 09:47</div><div><b>To: </b><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a></div><div><b>Reply To: </b>Kamailio (SER) - Users Mailing List</div><div><b>Subject: </b>[SR-Users] SIP-over-Websocket Load Balancing</div></div></td></tr></tbody></table><span><div style="border-style:solid none none;border-top-color:rgb(186,188,209);border-top-width:1pt;font-size:initial;text-align:initial;background-color:rgb(255,255,255)"></div><br><div><div dir="ltr">HI,<div><br></div><div>  how to handle sip-over-websocket load balancing (WebRTC)</div></div>
<br></div></span></div>

<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div><div dir="ltr">Alexandru Covalschi<br>ABRISS-Solutions<div>VoIP engineer and system administrator<br>phone: <a href="tel:%2B37367398493" value="+37367398493" target="_blank">+37367398493</a><br>web: <a href="http://abs-telecom.com/" target="_blank">http://abs-telecom.com/</a></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexandru Covalschi<br>ABRISS-Solutions<div>VoIP engineer and system administrator<br>phone: +37367398493<br>web: <a href="http://abs-telecom.com/" target="_blank">http://abs-telecom.com/</a></div></div></div>
</div>