[Kamailio-Devel] possibly bug in uac_send.c

heinz huber heinzhuber3 at gmx.net
Sun Feb 1 10:14:53 CET 2009


Hi folks,

I found a possibly bug in the new UAC module. I tried to test the new function uac_send_req. When if you this function in the following way :

file: kamailio.cfg ( default setup )

branch_route[2] {
        xlog("new branch at $ru\n");

                ## Send a SIP INFO message
                $uac_req(method)="OPTION";
                $uac_req(ruri)="sip:10.16.10.208";
                $uac_req(turi)="sip:999 at 10.16.10.208";
                $uac_req(furi)="sip:10.16.10.208";
                uac_send_req();
}


Kamailo won't start giving the following error message:

Feb  1 09:21:48 vmware kamailio: ERROR:uac:pv_parse_uac_req_name: unknown uac_req name method
Feb  1 09:21:48 vmware kamailio: ERROR:core:pv_parse_spec: pvar "uac_req" has an invalid name param [method]
                             ^
                             |
                             |                             


Feb  1 09:21:48 vmware kamailio: ERROR:core:pv_parse_spec: wrong char [)/41] in [$uac_req(method)] at [15 (5)]
Feb  1 09:21:48 vmware kamailio: CRITICAL:core:yyerror: parse error in config file, line 404, column 13-29: unknown script variable



Since the method parameter should be part of the pv $uac_req I've a possible bug in the following:

module: uac
file: uac_send.c


310                 break;
311                 case 6:
312                         if(strncmp(in->s, "method", 6)==0)
313                                 sp->pvp.pvn.u.isname.name.n = 7;
314        ---->>           if(strncmp(in->s, "onreply", 6)==0)
315                                 sp->pvp.pvn.u.isname.name.n = 8;
316                         else goto error;
317                 break;
318                default:


shouldn't it like ?


310                 break;
311                 case 6:
312                         if(strncmp(in->s, "method", 6)==0)
313                                 sp->pvp.pvn.u.isname.name.n = 7;
314                         else goto error;
315                 break;
316                 case 7:
317                         if(strncmp(in->s, "onreply", 7)==0)
318                                 sp->pvp.pvn.u.isname.name.n = 8;
319                         else goto error;
320                 break;
321                 default:


Please give me an answer if it isn't a bug or not. btw could somebody give me some hints when branch_route, onreply_route and failure_route are called. How can i add a request_route in the cfg file?

br
andi m

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01



More information about the Devel mailing list