<div dir="ltr"><div>I'm thinking about changing the architecture of the system I'm building. As it stands now, my registrars are on the edge of the network and they share a DB. If a user calls another user on another server, the callers registrar sends an INVITE to the callee and the caller's rtpproxy is used by both the caller and callee. So my first question is, should it be set up like this? Or should the caller's registrar hand the INVITE to the callee's registrar instead of the callee directly?</div>
<div><br></div><div>That leads me to my change. I'm thinking about adding a proxy at the edge in front of each registrar. On the proxies I'd use add_path() on each REGISTER before sending them to the registrar. Do you guys think this would be a better way of setting it up? Correct me if I'm wrong but I think if I do it this way, when an INVITE reaches a proxy it'll do a lookup() and then t_relay() to the appropriate registrar, right?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 16, 2013 at 11:06 AM, Charles Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.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">Peter - calling msg_apply_changes() after add_path() should indeed work, I'm sure, so thanks for pointing it out. However, when testing I'm getting parse errors in debug output, so am unable to confirm at this time.<div>

<br></div><div>Brian - which version are you using? Anything in log? After calling save(), path column in DB is empty?</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On 16 September 2013 15:18, Brian Wallen <span dir="ltr"><<a href="mailto:bwallen@gmail.com" target="_blank">bwallen@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">In my test setup the registrar is at the edge and add_path() does in fact do nothing. I also tried Charles' suggestion which didn't seem to add the Path header either.</div>

<div><div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Mon, Sep 16, 2013 at 10:04 AM, Peter Dunkley <span dir="ltr"><<a href="mailto:peter.dunkley@crocodilertc.net" target="_blank">peter.dunkley@crocodilertc.net</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">I thought append_hf() didn't take affect (unless you use msg_apply_changes()) until the message left Kamailio too?<div><br></div><div>If that is the case, and msg_apply_changes() is called, doesn't that mean the Path: header from add_path() would be added in that scenario?</div>



</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 16 September 2013 14:49, Charles Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.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">It is possible if the edge proxy and registrar are separate, as you say. But if the registrar is at the edge with no separate proxy, add_path() does nothing (because the message never leaves Kamailio for the header to be added).</div>



<div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 16 September 2013 14:42, Peter Dunkley <span dir="ltr"><<a href="mailto:peter.dunkley@crocodilertc.net" target="_blank">peter.dunkley@crocodilertc.net</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">Is there any reason it isn't possible?</div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 16 September 2013 14:21, Charles Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.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">Hi,<div><br></div><div>Yes, you are right - and I agree, it would be better if this was possible :)<br>




</div>
<div><br></div><div>Charles</div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div><br>
<br><div class="gmail_quote">On 16 September 2013 14:15, Peter Dunkley <span dir="ltr"><<a href="mailto:peter.dunkley@crocodilertc.net" target="_blank">peter.dunkley@crocodilertc.net</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>Hello,</div><div><br></div><div>It'd be better if the "add_path()" function could be used here.  That way, if using outbound (RFC5626), the flow-token (the userinfo part of the Path-URI) would be present and there would be no need to add the ";received" parameter.<br>







</div><div><br></div><div>This would address the one issue remaining for SIP outbound on Kamailio, which is its use without an edge proxy that is separate from the registrar.</div><div><br></div><div>Regards,</div><div><br>







</div><div>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On 16 September 2013 14:05, Charles Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.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><p dir="ltr">Hi,</p>
<p dir="ltr">This sounds like a case for sharing same database, and adding Path before saving incoming register. That way, no need to replicate register message to other servers and all subscribers use the same domain.</p>









<p dir="ltr">Add path something like this before calling save():</p>
<p dir="ltr">                        append_hf("Path: <sip:$Ri:$Rp;<br>
received=sip:$si:$sp;lr>\r\n");<br>
                        msg_apply_changes();<br></p>
<p dir="ltr">Whichever server receives the incoming invite, will perform lookup and automatically route to the server which received the register. On the proxying server set $du according to received param of route header, add record-route, and then t_relay(). As Daniel said, no need to re-authenticate or perform lookup again.</p>









<p dir="ltr">Regards,</p>
<p dir="ltr">Charles<br>
</p><div><div>
<div style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 16, 2013 at 7:34 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>









<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div><div><br>
<br>
On 9/12/13 10:08 PM, Brian Wallen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I currently have two independent kamailio servers. I'd like to set them up in a way that user1 on server1 can make a call to user2 on server2. After searching I've come up with two ways that this might be able to be done. Can someone please sanity check these or point me in the right direction?<br>










<br>
1. Have one registrar server and convert the other server to a proxy<br>
2. Keep them both as registrars and somehow make them each aware of the users on the other server<br>
<br>
I like 2 better because if one server went down users on the other server would still be up. The only thing is I don't know how to set the servers up to communicate with each other.<br>
</blockquote></div></div>
the nat can create problems when a server is down - if the nat is symmetric, only the server that received the registrar can send back calls to the phone.<br>
<br>
Communication between users on two servers is as simple as using t_relay_to("proto:serverip:<u></u>port") after you do lookup("location") and no record is found.</blockquote><div><br></div><div>Suppose I have three or more kamailio servers. If a call comes in and lookup() returns that no record was found, how do I know which server to forward to? Is that a case in which I should replicate the database?</div>









<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> You have to add an extra check for the case the call was coming from the other server, not to forward back to it in case of no found again.</blockquote>









<div><br></div><div>Thanks for the tip, I hadn't thought of that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Also, you should skip user authentication for calls from the other server (not do authenticate twice). Another aspect to take care is chaining rtpproxy, you have to use the flat for trusting the other server (r, iirc).<br>










<br>
You can also replicate the registration, but again, it can add troubles to the nat. Look at t_replicate() (in tm module).<br>
<br>
Cheers,<br>
Daniel<span><font color="#888888"><br>
<br>
-- <br>
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/<u></u>miconda</a><br>
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013<br>
  - more details about Kamailio trainings at <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> -<br>
<br>
<br>
______________________________<u></u>_________________<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" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a></font></span> </blockquote></div><br></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" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></div>

<br>
</div></div></div></div><font face="Helvetica, Arial, sans-serif"><font><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>







            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ.</font></span></font></font><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" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div>






<div>
<font face="courier new, monospace">Crocodile RCS Ltd</font></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" 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></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font>Charles Chance</font></b><br><font>Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font><br>






</font></font></div><div><font face="arial, helvetica, sans-serif"><font>t. 0121 285 4400    m. 07932 063 891</font></font></div></div>
</div><div><div>

<br>
<font face="Helvetica, Arial, sans-serif"><font><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ.</font></span></font></font></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" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" 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 dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div><div>





<font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</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" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" 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 dir="ltr"><font face="arial, helvetica, sans-serif"><b><font>Charles Chance</font></b><br><font>Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font><br>




</font></font></div><div><font face="arial, helvetica, sans-serif"><font>t. 0121 285 4400    m. 07932 063 891</font></font></div></div>
</div>

<br>
<font face="Helvetica, Arial, sans-serif"><font><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ.</font></span></font></font></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" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" 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 dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div><div>



<font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</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" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" 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" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" 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 dir="ltr"><font face="arial, helvetica, sans-serif"><b><font>Charles Chance</font></b><br><font>Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font><br>

</font></font></div><div><font face="arial, helvetica, sans-serif"><font>t. 0121 285 4400    m. 07932 063 891</font></font></div></div>
</div>

<br>
<font face="Helvetica, Arial, sans-serif"><font><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ.</font></span></font></font></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" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>