[Kamailio-Devel] possibly bug in uac_send.c

Daniel-Constantin Mierla miconda at gmail.com
Sun Feb 1 14:25:23 CET 2009


Hello,
you are right, thanks for troubleshooting. I committed the fix on SVN.

The referred request_route is the 'route' block.

Cheers,
Daniel


On 02/01/2009 11:14 AM, heinz huber wrote:
> 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
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list