Hello,

I'm observing  that Via Header domain name of type SRV is resolving as DNS A. 

I looked at the code and it does support only A. It is basically setting to default SIP port   check_via_address which is causing DNS A query.

Is there any specific reason to do so?



I changed the code to support SRV as below and working fine.

static int check_via_address(struct ip_addr* ip, str *name,
unsigned short port, short proto, int resolver)
{
:
:
//if (port==0) port=SIP_PORT;
if (resolver&DO_DNS){
DBG("check_via_address: doing dns lookup\n");
/* try all names ips */
he=sip_resolvehost(name, &port, (char *) &proto); /* don't use naptr */
if (he && ip->af==he->h_addrtype){
for(i=0;he && he->h_addr_list[i];i++){
if ( memcmp(&he->h_addr_list[i], ip->u.addr, ip->len)==0)
return 0;
}
}
}
:
:
:
}


/* check if IP address in Via != source IP address of signaling */
int received_test( struct sip_msg *msg )
{
int rcvd;

rcvd=msg->via1->received
|| check_via_address(&msg->rcv.src_ip, &msg->via1->host,
msg->via1->port, msg->via1->proto, received_dns);
return rcvd;
}



Thanks
Jijo