<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
On 1/20/12 9:48 PM, Xi Liu wrote:
<blockquote
cite="mid:1F502D64-3EF4-43C9-8BB0-BF4BAF001F89@gmail.com"
type="cite">Hi,<br>
<br>
I'm new to kamailio, have some questions here hope anyone can
help!<br>
<br>
Question 1,<br>
<br>
I'm trying to use some of the functions in usrloc module, but for
some reason if I use those from "Available Functions" part,
the kamailio won't start and give an error of "unknown command
<ul_get_ucontact>, missing loadmodule?"<br>
<br>
The usrloc module is definitely loaded, and it will start as long
as I avoid using those "Available Functions". I tried some other
modules it will lead to same error.<br>
</blockquote>
<br>
usrloc's interface to configuration file is registrar module, you
have to load it and use save()/lookup() functions to store/retrieve
location records.<br>
<br>
"Available functions" section in the readme is for developers that
want to bind to usrloc module from C code.<br>
<br>
<blockquote
cite="mid:1F502D64-3EF4-43C9-8BB0-BF4BAF001F89@gmail.com"
type="cite"><br>
Question 2,<br>
<br>
What is the simplest way to bridge a call based on username and
domain?<br>
</blockquote>
<br>
When the call comes in, after initial checks (like authentication),
do a lookup("location") and if you get true, then just relay the
call via t_relay().<br>
<br>
Perhaps the best is to start with the default configuration file,
maybe installing from git, there are some guidelines at:<br>
<br>
* <a class="moz-txt-link-freetext" href="http://www.kamailio.org/wiki/install/3.2.x/git">http://www.kamailio.org/wiki/install/3.2.x/git</a><br>
<br>
If you follow that tutorial, you should get what you want.<br>
<br>
<blockquote
cite="mid:1F502D64-3EF4-43C9-8BB0-BF4BAF001F89@gmail.com"
type="cite"><br>
I was trying to make a simple experiment I used to do in
Freeswitch,<br>
<br>
==========================<br>
Have 1000,1001,1002 registered,<br>
<br>
When 1000 calls 9999, the calls will be bridged to 1001 or 1002
based on different time period.<br>
==========================<br>
<br>
While in Freeswitch, it would be as simple as "bridge <a
moz-do-not-send="true" href="mailto:xxxx@domain.com">xxxx@domain.com</a>",
and then freeswitch will lookup contact information and forward
the call.<br>
<br>
But in kamailio, I only succeed in forwarding calls by change the
$du to the exact contact uri, which is "<a moz-do-not-send="true"
href="sip:xxxx@ip-of-the-phone:port">sip:xxxx@ip-of-the-phone:port</a>",
the call r_relay(). In order to do this, I need call a perl script
to lookup the location database to find a match… <br>
</blockquote>
No need to use perl, as said, look at registrar module.<br>
<br>
<blockquote
cite="mid:1F502D64-3EF4-43C9-8BB0-BF4BAF001F89@gmail.com"
type="cite"><br>
I'm 99% sure I'm doing wrong here… there must be a way way easier
than that, but so far I can't find it….<br>
</blockquote>
<br>
It is, default config has all needed, read also the top of the
config, has some comments presenting what features can be enabled
there.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>