Endpoint identify with IP:Port

Hello,

We trying to using IP:Port/Subnet in the Identify match for an endpoint. According to doc it is supported by Asterisk, Asterisk 16 Configuration_res_pjsip_endpoint_identifier_ip - Asterisk Project - Asterisk Project Wiki
here is the sample how we use that,

[siptrunk]                                                                                                                                                                                                                                   
type=identify                                                                                                                                                                                                                                 
endpoint=siptrunk
match=192.168.10.1:5090/24

Getting following error in the asterisk log,

[Sep 29 15:47:25] ERROR[14896] config_options.c: Error parsing match=192.168.10.1:5090/24 at line 389 of                                                                                                                                     
[Sep 29 15:47:25] ERROR[14896] res_sorcery_config.c: Could not create an object of type 'identify' with id 'siptrunk' from configuration file 'pjsip.conf'                                                                               
[Sep 29 15:47:25] WARNING[14896] netsock2.c: Port disallowed in 192.168.10.1:5090  

As per code the port parsing disabled by PARSE_PORT_FORBID flag,

static struct ast_sip_endpoint *ip_identify(pjsip_rx_data *rdata)                                                                                                                                                                             
{                                                                                                                                                                                                                                             
        struct ast_sockaddr addr = { { 0, } };                                                                                                                                                                                                
                                                                                                                                                                                                                                              
        ast_sockaddr_parse(&addr, rdata->pkt_info.src_name, PARSE_PORT_FORBID);                                                                                                                                                               
        ast_sockaddr_set_port(&addr, rdata->pkt_info.src_port);                                                                                                                                                                               
                                                                                                                                                                                                                                              
        return common_identify(ip_identify_match_check, &addr);                                                                                                                                                                               
} 

Is there any side effect to use that feature?

Thanks,
Salah

That code is perfectly fine and unrelated to your error. What version of Asterisk are you using? Support for ports was added in later versions.

Thanks for quick reply, My running version is Asterisk 16.2.1
Its a bit older version. Do you think its implemented latter version?

It is implemented in newer versions.

Okay, then let me try with newest version.
Thanks,
Salah