<div dir="ltr">HI all<div><br></div><div>I Define the following regular expression in my first opensips1 domain config file</div><div><br></div><div><div> if ($tU =~"^3*") {</div><div><br></div><div> #strip(1);</div><div><br></div><div> if(!lookup("location")) {</div><div> if(!t_relay("udp:opensips2:5060")){</div><div><br></div><div> sl_send_reply("404", "User Offline/Not Found");</div><div> }</div><div> } </div><div> }</div></div><div><br></div><div><br></div><div>and then Define another regular expression in my second opensips2 domain config file</div><div><br></div><div><br></div><div><div> if ($tU=~"^3*" && $fd != "opensips2") {</div><div><br></div><div> if (!lookup("location")) {</div><div> sl_send_reply("404", "User Offline/Not Found");</div><div> } else {</div><div> t_relay();</div><div> }</div><div> }</div></div><div><br></div><div>when i dial 30001 from 10001@opensip1</div><div><br></div><div>i got error from opensips1</div><div><br></div><div><div><br></div><div>Nov 6 20:35:53 CDlinux /usr/local/opensips_proxy/sbin/opensips[25544]: ERROR:dialog:get_routing_info: failed to print route records </div><div>Nov 6 20:35:53 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]: ERROR:core:print_rr_body: too many RR</div><div>Nov 6 20:35:53 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]: ERROR:dialog:get_routing_info: failed to print route records </div><div>Nov 6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]: ERROR:core:print_rr_body: too many RR</div><div>Nov 6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]: ERROR:dialog:get_routing_info: failed to print route records </div><div>Nov 6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]: ERROR:core:print_rr_body: too many RR</div><div>Nov 6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]: ERROR:dialog:get_routing_info: failed to print route records </div><div>Nov 6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25547]: ERROR:core:print_rr_body: too many RR</div><div>Nov 6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25547]: ERROR:dialog:get_routing_info: failed to print route records</div></div><div><br></div><div>i did not figure out what wrong it is going. what does RR mean, </div><div><br></div><div>do any module i miss to compile or load ?</div><div><br></div><div>thanks</div><div><br></div><div>Michael</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 6, 2014 at 6:23 PM, Michael Leung <span dir="ltr"><<a href="mailto:gbcbooksmj@gmail.com" target="_blank">gbcbooksmj@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">Hi SamyGo<div><br></div><div>My Objective is to understand how sip work </div><div>you said that is the easiest way of how to route a call automatic , so do you have a better way to do that ? </div><div><br></div><div>i want a more smart scheme to actualize dynamic routing.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 12:33 AM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@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">Hi Michael,<div><br><div>If you HAVE to register two phones at two different OpenSIPS with different domains then there are few ways to do it. I'll go with the easy one.</div><div><br></div><div>1 - Static call routing </div><div>Define a regular expression in both OpenSIPS to dial to the other OpenSIPS if the dialled destination number has certain prefix in front of it and vice-versa.</div><div>i.e calls From <a href="mailto:4135@OpenSIP1.your1st-domain.com" target="_blank">4135@OpenSIP1.your1st-domain.com</a> to 94135 will route to <a href="http://OpenSIPS2.your2nd-domain.com" target="_blank">OpenSIPS2.your2nd-domain.com</a> ; </div><div>At your OpenSIPS2 in the config file you've to use regexp that anything having a 9 in prefix and Not from myself then strip off prefix 9,</div><div>do a lookup("location") search for online user and t_relay the call to it.<br></div><div><br></div><div><font face="courier new, monospace">if ($tU =~ "^9*" && $fd != "<a href="http://OpenSIPS2.your2nd-domain.com" target="_blank">OpenSIPS2.your2nd-domain.com</a>" ) {</font></div><div><font face="courier new, monospace" style="background-color:rgb(255,255,255)" color="#0000ff">#Above detects if it has a 9 prefix and call is not coming from my own users</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> strip(1);</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> if(!lookup("location") {</font></div><div><font face="courier new, monospace" color="#0000ff">#above condition will lookup user if it is registered, if Not then return below message. </font></div><div><font face="courier new, monospace"> sl_send_reply("404", "User Offline/Not Found");</font></div><div><font face="courier new, monospace"> } else {<br></font></div><div><font face="courier new, monospace" color="#0000ff">#If user is found then relay the call to it.</font></div><div><font face="courier new, monospace"> t_relay();</font></div><div><font face="courier new, monospace"> }</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">}</font></div><div><br></div><div><br></div><div>That is the easiest and static way of how you can do it. Why do you need to use OpenSIPS for this? what exactly are your objectives ? </div><div>Hope this helped you understand a bit. </div><div><br></div><div><br></div><div>BR,</div><div>Sammy</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><div><div>On Fri, Oct 31, 2014 at 7:13 AM, Michael Leung <span dir="ltr"><<a href="mailto:gbcbooksmj@gmail.com" target="_blank">gbcbooksmj@gmail.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 dir="ltr">Hi all<div><br></div><div>i know this is a stupid question</div><div><br></div><div>but i dont use sip to make a phone call very often , </div><div><br></div><div>i have setup up two opensips server in my intranet environment</div><div><br></div><div>i use two phones to register on each server </div><div><br></div><div>how to make a phone call from one to another one</div><div><br></div><div>do i have to add the the destination domain name behind the alias number when i dial out ?</div><div><br></div><div>or why can i dial the alias number without domain name , then the opensips server will routing it to a the opensips server automatically </div><div><br></div><div><br></div><div>thanks </div><span><font color="#888888"><div><br></div><div>Michael</div></font></span></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>