<div dir="ltr">if i just add a user and a usrloc to my usrloc database<div>eg.</div><div><br><div>opensipsctl add user1 1234</div><div>opensipsctl ul add user1 <a href="mailto:user1@voipserver.dk">user1@voipserver.dk</a></div>
<div><br></div><div>how do i in the simplest manner rewrite the call?</div><div>so when i call user1 from user2, it rewrites user1 to <a href="mailto:user1@voipserver.dk">user1@voipserver.dk</a></div><div><br></div><div>if i could just understand how this part is written in the config i think i'll find the rest much easier</div>
<div><br></div><div> </div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-10 11:56 GMT+01:00 Liviu Chircu <span dir="ltr"><<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hello Mike,<br>
<br>
Instead of simply relaying initial INVITEs, you should also add
some registrar logic. You need at least something like this:<br>
<br>
if (!lookup("location")) {<br>
t_reply("404", "Not Found");<br>
exit;<br>
}<br>
<br>
A successful registrar <b>lookup</b> will also rewrite the R-URI
of your requests. Read more about it here [1].<br>
<br>
[1]:
<a href="http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294027" target="_blank">http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294027</a><br>
<br>
Best regards,<br>
<pre cols="72">Liviu Chircu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
On 03/10/2014 12:03 PM, Mike Claudi Pedersen wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>im trying to establish connection between 2 phones</div>
<div>user1: 43384001</div>
<div>user2: 43384002</div>
<div><br>
</div>
<div>i have user 2 added to usrloc with the cmd:</div>
<div><br>
</div>
<div>
<div>
opensipsctl ul add 43384003 sip:+1043384003*<a href="mailto:2776@voip.local.com" target="_blank">2776@voip.local.com</a></div>
</div>
<div>which is an asterisk server that handles calls in a
specific way.</div>
<div><br>
</div>
<div>but when i try to call i get "too many hops"</div>
<div><br>
</div>
<div>this is my invite handling</div>
<div><br>
</div>
<div>if (method=="INVITE")</div>
<div> {</div>
<div> t_relay();</div>
<div> exit;</div>
<div> };</div>
<div><br>
</div>
<div>do i need some sort of line added to include using usrloc</div>
-- <br>
<div dir="ltr">Med venlig hilsen<br>
ipnordic A/S<br>
<div><br>
</div>
<div>Mike Claudi Pedersen</div>
<div>Tekniker</div>
<div>
<div><br>
</div>
Telefon: <span style="color:rgb(61,58,54);font-family:aller_lightregular,Arial,Helvetica,sans-serif">79301033</span><br>
<a href="http://www.ipnordic.dk/" style="color:rgb(17,85,204)" target="_blank">www.ipnordic.dk</a></div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><div class=""><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</div></blockquote>
<br>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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><br clear="all"><div><br></div>-- <br><div dir="ltr">Med venlig hilsen<br>ipnordic A/S<br><div><br></div><div>Mike Claudi Pedersen</div><div>Tekniker</div><div><div><br></div>Telefon: <span style="color:rgb(61,58,54);font-family:aller_lightregular,Arial,Helvetica,sans-serif">79301033</span><br>
<a href="http://www.ipnordic.dk/" style="color:rgb(17,85,204)" target="_blank">www.ipnordic.dk</a></div></div>
</div>