Daniel,
Thank you for your response. I was away the remainder of the past week.
Calls to uac_reg_lookup() and uac_reg_request_to(), with prior
assignment or no assignment, yield "fixing failed (code=-1)". For example,
if(uac_reg_request_to("$rU", 0)){ #line 76
0(16293) DEBUG: <core> [route.c:929]: fixing uac_reg_request_to()
0(16293) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:76
I am most interested in function uac_reg_request_to(). I expect to
receive a REGISTER command from a local user and forward it with proper
credentials to a remote server. I believe uac_reg_request_to() will
read (a memory image of) the uacreg file for the remote user's name and
credentials, and manage registration at the remote server. Is this correct?
I would like to lookup the registration information by $tU. Both of the
following code snippets get "fixing failed".
(1) if(uac_reg_request_to("$tU", 0)){
and
(2) $rU = $tU;
if(uac_reg_request_to("$rU", 0)){
Thank you for any hints or examples of how to use uac_reg_request_to().
BTW: How do I become a member of sr-users@lists.sip-router.org?
regards,
Ron Hopson
On 8/14/2012 12:59 AM, Daniel-Constantin Mierla wrote:
Hello,
the parameters are expected to be variables, but looking at the log
messages it seems that config optimization replace them with the
string values, at you have the assignment just above the function, the
parameters will be those string values always at runtime.
Can you remove the assign statements and try again to see if starts ok?
Cheers,
Daniel
On 8/14/12 1:11 AM, Ron Hopson wrote:
Hello,
I cannot create a configuration consistent with uac_reg_lookup. Does
someone have a configuration with a simple example of uac_reg_lookup
that works with db_text file uacreg?
I have kamailio 3.3 running on linux. Based on suggestions in
http://kamailio.org/docs/modules/3.3.x/modules_k/uac.html
and
http://by-miconda.blogspot.com/2010/10/best-of-new-in-kamailio-310-10.html
I created this record in db_text file uacreg:
2:12345678:daniel:mysipserver.com:daniel123:sipprovider.com:sipprovider.com:daniel123:xxxxx:"sip:sipprovider.com"
I assume that function uac_reg_lookup retrieves registration
information from this record after it is loaded into a memory table.
One version of the configuration file is attached. Here are three
examples of failures to create a configuration.
$rU = 12345678;
if(uac_reg_lookup("$rU", "$ru")){ #line 73
0(13856) DEBUG: <core> [rvalue.c:2857]: RV fixing type 1
0(13856) DEBUG: <core> [rvalue.c:2861]: RV is int: 12345678
0(13856) DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
0(13856) DEBUG: <core> [route.c:929]: fixing uac_reg_lookup()
0(13856) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:73
---------
$rU = "12345678";
if(uac_reg_lookup("$rU", "$ru")){ #line 73
0(13973) DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
0(13973) DEBUG: <core> [rvalue.c:2865]: RV is str: "12345678"
0(13973) DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
0(13973) DEBUG: <core> [route.c:929]: fixing uac_reg_lookup()
0(13973) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:73
--------
$rU = "12345678";
$ru = "sip:mysipserver.com";
if(uac_reg_lookup("$rU", "$ru")){ #line 74
0(13976) DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
0(13976) DEBUG: <core> [rvalue.c:2865]: RV is str: "12345678"
0(13976) DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
0(13976) DEBUG: <core> [rvalue.c:2865]: RV is str:
"sip:mysipserver.com"
0(13976) DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
0(13976) DEBUG: <core> [route.c:929]: fixing uac_reg_lookup()
0(13976) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:74
---------------------
regards,
Ron Hopson
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -http://www.asipto.com
http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012
-http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012
-http://asipto.com/u/kpw
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users