[SR-Users] Segfault starting kamailio, function "registered"

Daniel-Constantin Mierla miconda at gmail.com
Fri Aug 14 11:04:55 CEST 2020


Hello,

you have to put $tu inside double quotes:

if (registered("kam_location", "$tu")) {

The error says that the parameter is not expected in the format you set.

The crash can be because of interpreter trying to go further parsing the
config, something similar to:

  - https://github.com/kamailio/kamailio/issues/2239

Cheers,
Daniel

On 14.08.20 10:23, Jon Bonilla (Manwe) wrote:
> Hi
>
> when I start kamailio in my dev system it fails to start and segfaults. 
>
> Version: 5.4.0
>
> CFG Line: if (registered("kam_location",$tu)) {
>
> Log:
> Aug 14 10:20:29 pekedev2 kamailio: CRITICAL: <core> [core/cfg.y:3588]:
> yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 382,
> column 34-36: function registered: parameter 2 is not constant#012 
>
> Aug 14
> 10:20:29 pekedev2 kernel: [1501045.504630] kamailio[21276]: segfault at
> 6e6f6974 ip 00005566607d8887 sp 00007ffd6761b240 error 4 in
> kamailio[55666079d000+431000] 
>
> Aug 14 10:20:29 pekedev2 kernel: [1501045.504655]
> Code: 89 bd 68 ff ff ff 64 48 8b 04 25 28 00 00 00 48 89 45 c8 31 c0 48 83 bd
> 68 ff ff ff 00 0f 84 f5 09 00 00 48 8b 85 68 ff ff ff <8b> 00 83 f8 01 0f 85 65
> 09 00 00 48 8b 85 68 ff ff ff 8b 40 0c 85
>
>
> The coredump is not clear to me. I extracted using coredumpctl (fuck you
> systemd) and running gdb. Is there a new method now that systemd has taken
> control of my systems?
>
>
> cheers,
>
> Jon
>
>
> -- 
> PekePBX, the multitenant PBX solution
> https://pekepbx.com
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200814/5e4d6015/attachment.htm>


More information about the sr-users mailing list