Hello Nathaniel,
See the attached patch - it logs more from the part where the params are
handled .
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:
> Hello Bogdan,
>
> Here are snippets from my script. I only have one place where I
> execute the save function. Just wondering, could it be truncating a byte?
>
> modparam("usrloc", "nat_bflag", 10)
> modparam("usrloc", "use_domain", 1)
> modparam("usrloc", "db_mode", 3)
> modparam("usrloc", "db_url",
> "postgres://opensips:[email protected]/opensips181t")
> modparam("registrar", "tcp_persistent_flag", 7)
> modparam("registrar", "received_avp", "$avp(received_nh)")
>
>
> xlog("SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
> ....................................................");
> if (!save("location","p1"))
> {
> xlog("L_ERR", "ERR:callerid:$ci|end|System error trying to
> save Register's request location");
> sl_reply_error();
> }
>
> xlog("L_NOTICE", "NOTICE:callerid:$ci|end|The subscriber has
> successfully registered with Akan Voice");
> exit;
>
> Thanks
>
> Nathaniel
>
> On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:
>> Hello Nathaniel,
>>
>> That is odd.....it's like you do not set the "p1" flag ....
>>
>> I tested and I with "p1" flag I get:
>> May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags are 10
>>
>> Are you sure your script gets to the right save() ??
>>
>> Regards,
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
>>> Hello Bogdan,
>>>
>>> I added the patch and here is what I found: "OpenSips[4378]: [ID
>>> 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags are 0". I
>>> have also included the log file.
>>>
>>> Thanks
>>>
>>> Nathaniel Keeling
>>>
>>> On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
>>>> Hello Nathaniel,
>>>>
>>>> Attached is an extended patch - remove the old one and apply this
>>>> one. Again look for any xXx logs .
>>>>
>>>> Regards,
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Founder and Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>> On 05/14/2013 02:47 PM, Nathaniel L Keeling III wrote:
>>>>> Hello Bogdan,
>>>>>
>>>>> here is the output from opensips's og file of the save() with the
>>>>> patch and the code snippet from the opensips.cfg. I did not see
>>>>> any ant logs with "xXx". Also,I have usrloc's db_mode set to 3.
>>>>>
>>>>> xlog("SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
>>>>> ....................................................");
>>>>> if (!save("location","p1"))
>>>>> {
>>>>> xlog("L_ERR", "ERR:callerid:$ci|end|System error trying to
>>>>> save Register's request location");
>>>>> sl_reply_error();
>>>>> }
>>>>> xlog("L_NOTICE", "NOTICE:callerid:$ci|end|The subscriber has
>>>>> successfully registered with Akan Voice");
>>>>> exit;
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [email protected]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Index: modules/registrar/save.c
===================================================================
--- modules/registrar/save.c (revision 10023)
+++ modules/registrar/save.c (working copy)
@@ -247,11 +247,14 @@
}
/* extract Path headers */
+ LM_DBG("xXx - flags are %X \n",_flags);
if ( _flags®_SAVE_PATH_FLAG ) {
+ LM_DBG("xXx - saving path into usrloc \n");
if (build_path_vector(_m, &path, &path_received, _flags) < 0) {
rerrno = R_PARSE_PATH;
goto error;
}
+ LM_DBG("xXx - path is <%.*s>(%d)\n",path.len,path.s,path.len);
if (path.len && path.s) {
ci.path = &path;
/* save in msg too for reply */
@@ -749,11 +752,13 @@
sctx.max_contacts = -1;
sctx.flags = 0;
+ LM_DBG("xXx - flags param is %s \n",_f);
if (_f && _f[0]!=0) {
if (fixup_get_svalue( _m, (gparam_p)_f, &flags_s)!=0) {
LM_ERR("invalid flags parameter");
return -1;
}
+ LM_DBG("xXx - flags string is <%.*s> \n",flags_s.len,flags_s.s);
for( st=0 ; st< flags_s.len ; st++ ) {
switch (flags_s.s[st]) {
case 'm': sctx.flags |= REG_SAVE_MEMORY_FLAG; break;
@@ -799,6 +804,7 @@
}
}
}
+ LM_DBG("xXx - flags bitmask is <%X> \n",sctx.flags);
if(route_type == ONREPLY_ROUTE)
sctx.flags |= REG_SAVE_NOREPLY_FLAG;
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users