ast_log(LOG_WARNING,"Receive error from %s\n", inet_ntoa(sin->sin_addr));
ast_log(LOG_WARNING,"Receive error from %s\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
else
ast_log(LOG_WARNING,"No address detected??\n");
}else{
@ -939,9 +940,10 @@ static int handle_error(void)
staticintsend_packet(structast_iax_frame*f)
{
intres;
chariabuf[80];
/* Called with iaxsl held */
if(option_debug)
ast_log(LOG_DEBUG,"Sending %d on %d/%d to %s:%d\n",f->ts,f->callno,iaxs[f->callno]->peercallno, inet_ntoa(iaxs[f->callno]->addr.sin_addr),ntohs(iaxs[f->callno]->addr.sin_port));
ast_log(LOG_DEBUG,"Sending %d on %d/%d to %s:%d\n",f->ts,f->callno,iaxs[f->callno]->peercallno,ast_inet_ntoa(iabuf,sizeof(iabuf),iaxs[f->callno]->addr.sin_addr),ntohs(iaxs[f->callno]->addr.sin_port));
/* Don't send if there was an error, but return error instead */
if(f->callno<0){
ast_log(LOG_WARNING,"Call number = %d\n",f->callno);
@ -1108,6 +1110,7 @@ static int attempt_transmit(void *data)
structast_iax_frame*f=data;
intfreeme=0;
intcallno=f->callno;
chariabuf[80];
/* Make sure this call is still active */
if(callno>-1)
ast_mutex_lock(&iaxsl[callno]);
@ -1124,7 +1127,7 @@ static int attempt_transmit(void *data)
iax_destroy_nolock(f->callno);
}else{
if(iaxs[f->callno]->owner)
ast_log(LOG_WARNING,"Max retries exceeded to host %s on %s (type = %d, subclass = %d, ts=%d, seqno=%d)\n", inet_ntoa(iaxs[f->callno]->addr.sin_addr),iaxs[f->callno]->owner->name,f->f->frametype,f->f->subclass,f->ts,f->seqno);
ast_log(LOG_WARNING,"Max retries exceeded to host %s on %s (type = %d, subclass = %d, ts=%d, seqno=%d)\n",ast_inet_ntoa(iabuf,sizeof(iabuf),iaxs[f->callno]->addr.sin_addr),iaxs[f->callno]->owner->name,f->f->frametype,f->f->subclass,f->ts,f->seqno);
ast_log(LOG_NOTICE,"Asked to authenticate to %s with an RSA key, but they don't allow RSA authentication\n", inet_ntoa(sin->sin_addr));
ast_log(LOG_NOTICE,"Asked to authenticate to %s with an RSA key, but they don't allow RSA authentication\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
}elseif(!strlen(challenge)){
ast_log(LOG_NOTICE,"No challenge provided for RSA authentication to %s\n", inet_ntoa(sin->sin_addr));
ast_log(LOG_NOTICE,"No challenge provided for RSA authentication to %s\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
send_command_final(iaxs[fr.callno],AST_FRAME_IAX,AST_IAX_COMMAND_REJECT,0,"No such context/extension",strlen("No such context/extension"),-1);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
send_command_final(iaxs[fr.callno],AST_FRAME_IAX,AST_IAX_COMMAND_REJECT,0,"Unable to negotiate codec",strlen("Unable to negotiate codec"),-1);
ast_log(LOG_NOTICE,"Rejected call to %s, format 0x%x incompatible with our capability 0x%x.\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->peerformat,iaxs[fr.callno]->capability);
ast_log(LOG_NOTICE,"Rejected call to %s, format 0x%x incompatible with our capability 0x%x.\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->peerformat,iaxs[fr.callno]->capability);
}else{
iaxs[fr.callno]->state|=IAX_STATE_STARTED;
if(iaxs[fr.callno]->owner){
@ -4054,7 +4070,7 @@ retryowner:
/* A little strange -- We have to actually go through the motions of
ast_log(LOG_NOTICE,"Host %s failed to authenticate as %s\n", inet_ntoa(iaxs[fr.callno]->addr.sin_addr),iaxs[fr.callno]->username);
ast_log(LOG_NOTICE,"Host %s failed to authenticate as %s\n",ast_inet_ntoa(iabuf,sizeof(iabuf),iaxs[fr.callno]->addr.sin_addr),iaxs[fr.callno]->username);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
send_command_final(iaxs[fr.callno],AST_FRAME_IAX,AST_IAX_COMMAND_REJECT,0,"No such context/extension",strlen("No such context/extension"),-1);
}else{
/* Select an appropriate format */
@ -4101,14 +4117,14 @@ retryowner:
ast_log(LOG_DEBUG,"We don't do requested format %s, falling back to peer capability %d\n",ast_getformatname(iaxs[fr.callno]->peerformat),iaxs[fr.callno]->peercapability);
ast_log(LOG_NOTICE,"Rejected dial attempt from %s, request '%s@%s' does not exist\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected dial attempt from %s, request '%s@%s' does not exist\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
send_command_final(iaxs[fr.callno],AST_FRAME_IAX,AST_IAX_COMMAND_REJECT,0,"No such context/extension",strlen("No such context/extension"),-1);
}else{
iaxs[fr.callno]->state|=IAX_STATE_STARTED;
if(option_verbose>2)
ast_verbose(VERBOSE_PREFIX_3"Accepting DIAL from %s, formats = 0x%x\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->peerformat);
ast_verbose(VERBOSE_PREFIX_3"Accepting DIAL from %s, formats = 0x%x\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->peerformat);
ast_log(LOG_DEBUG,"Sending %d on %d/%d to %s:%d\n",f->ts,f->callno,iaxs[f->callno]->peercallno, inet_ntoa(iaxs[f->callno]->addr.sin_addr),ntohs(iaxs[f->callno]->addr.sin_port));
ast_log(LOG_DEBUG,"Sending %d on %d/%d to %s:%d\n",f->ts,f->callno,iaxs[f->callno]->peercallno,ast_inet_ntoa(iabuf,sizeof(iabuf),iaxs[f->callno]->addr.sin_addr),ntohs(iaxs[f->callno]->addr.sin_port));
/* Don't send if there was an error, but return error instead */
if(!f->callno){
ast_log(LOG_WARNING,"Call number = %d\n",f->callno);
@ -1382,6 +1384,7 @@ static int attempt_transmit(void *data)
structiax_frame*f=data;
intfreeme=0;
intcallno=f->callno;
chariabuf[80];
/* Make sure this call is still active */
if(callno)
ast_mutex_lock(&iaxsl[callno]);
@ -1398,7 +1401,7 @@ static int attempt_transmit(void *data)
iax2_destroy_nolock(f->callno);
}else{
if(iaxs[f->callno]->owner)
ast_log(LOG_WARNING,"Max retries exceeded to host %s on %s (type = %d, subclass = %d, ts=%d, seqno=%d)\n", inet_ntoa(iaxs[f->callno]->addr.sin_addr),iaxs[f->callno]->owner->name,f->af.frametype,f->af.subclass,f->ts,f->oseqno);
ast_log(LOG_WARNING,"Max retries exceeded to host %s on %s (type = %d, subclass = %d, ts=%d, seqno=%d)\n",ast_inet_ntoa(iabuf,sizeof(iabuf),iaxs[f->callno]->addr.sin_addr),iaxs[f->callno]->owner->name,f->af.frametype,f->af.subclass,f->ts,f->oseqno);
ast_log(LOG_DEBUG,"Expanded trunk '%s:%d' to %d bytes\n", inet_ntoa(tpeer->addr.sin_addr),ntohs(tpeer->addr.sin_port),tpeer->trunkdataalloc);
ast_log(LOG_DEBUG,"Expanded trunk '%s:%d' to %d bytes\n",ast_inet_ntoa(iabuf,sizeof(iabuf),tpeer->addr.sin_addr),ntohs(tpeer->addr.sin_port),tpeer->trunkdataalloc);
}else{
ast_log(LOG_WARNING,"Insufficient memory to expand trunk data to %s:%d\n", inet_ntoa(tpeer->addr.sin_addr),ntohs(tpeer->addr.sin_port));
ast_log(LOG_WARNING,"Insufficient memory to expand trunk data to %s:%d\n",ast_inet_ntoa(iabuf,sizeof(iabuf),tpeer->addr.sin_addr),ntohs(tpeer->addr.sin_port));
ast_mutex_unlock(&tpeer->lock);
return-1;
}
}else{
ast_log(LOG_WARNING,"Maximum trunk data space exceeded to %s:%d\n", inet_ntoa(tpeer->addr.sin_addr),ntohs(tpeer->addr.sin_port));
ast_log(LOG_WARNING,"Maximum trunk data space exceeded to %s:%d\n",ast_inet_ntoa(iabuf,sizeof(iabuf),tpeer->addr.sin_addr),ntohs(tpeer->addr.sin_port));
ast_mutex_unlock(&tpeer->lock);
return-1;
}
@ -2994,6 +2999,7 @@ static int iax2_show_peers(int fd, int argc, char *argv[])
#define FORMAT "%-15.15s %-15.15s %s %-15.15s %-5d%s %-10s\n"
structiax2_peer*peer;
charname[256]="";
chariabuf[80];
intregisteredonly=0;
if((argc!=3)&&(argc!=4)&&(argc!=5))
returnRESULT_SHOWUSAGE;
@ -3027,10 +3033,10 @@ static int iax2_show_peers(int fd, int argc, char *argv[])
ast_log(LOG_NOTICE,"Host %s failed MD5 authentication for '%s' (%s != %s)\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr),p->name,requeststr,md5secret);
if(p->temponly)
free(p);
return-1;
@ -3720,12 +3732,13 @@ static int authenticate(char *challenge, char *secret, char *keyn, int authmetho
{
intres=-1;
intx;
chariabuf[80];
if(keyn&&!ast_strlen_zero(keyn)){
if(!(authmethods&IAX_AUTH_RSA)){
if(!secret||ast_strlen_zero(secret))
ast_log(LOG_NOTICE,"Asked to authenticate to %s with an RSA key, but they don't allow RSA authentication\n", inet_ntoa(sin->sin_addr));
ast_log(LOG_NOTICE,"Asked to authenticate to %s with an RSA key, but they don't allow RSA authentication\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
}elseif(ast_strlen_zero(challenge)){
ast_log(LOG_NOTICE,"No challenge provided for RSA authentication to %s\n", inet_ntoa(sin->sin_addr));
ast_log(LOG_NOTICE,"No challenge provided for RSA authentication to %s\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
}else{
charsig[256];
structast_key*key;
@ -3762,7 +3775,7 @@ static int authenticate(char *challenge, char *secret, char *keyn, int authmetho
iax_ie_append_str(ied,IAX_IE_PASSWORD,secret);
res=0;
}else
ast_log(LOG_NOTICE,"No way to send secret to peer '%s' (their methods: %d)\n", inet_ntoa(sin->sin_addr),authmethods);
ast_log(LOG_NOTICE,"No way to send secret to peer '%s' (their methods: %d)\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr),authmethods);
}
returnres;
}
@ -3966,6 +3979,7 @@ static int iax2_ack_registry(struct iax_ies *ies, struct sockaddr_in *sin, int c
charourip[256]="<Unspecified>";
structsockaddr_inoldus;
structsockaddr_inus;
chariabuf[80];
intoldmsgs;
memset(&us,0,sizeof(us));
@ -3986,7 +4000,7 @@ static int iax2_ack_registry(struct iax_ies *ies, struct sockaddr_in *sin, int c
memcpy(&oldus,®->us,sizeof(oldus));
oldmsgs=reg->messages;
if(inaddrcmp(®->addr,sin)){
ast_log(LOG_WARNING,"Received unsolicited registry ack from '%s'\n", inet_ntoa(sin->sin_addr));
ast_log(LOG_WARNING,"Received unsolicited registry ack from '%s'\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
return-1;
}
memcpy(®->us,&us,sizeof(reg->us));
@ -4007,8 +4021,8 @@ static int iax2_ack_registry(struct iax_ies *ies, struct sockaddr_in *sin, int c
snprintf(msgstatus,sizeof(msgstatus)," with 1 message waiting\n");
elseif(reg->messages>-1)
snprintf(msgstatus,sizeof(msgstatus)," with no messages waiting\n");
@ -4688,6 +4706,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
chardblbuf[4096];/* Declaration of dblbuf must immediately *preceed* fr on the stack */
structiax_framefr;
structiax_frame*cur;
chariabuf[80];
structast_framef;
structast_channel*c;
structiax2_dpcache*dp;
@ -4734,7 +4753,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
ptr=mth->data;
tpeer=find_tpeer(&sin);
if(!tpeer){
ast_log(LOG_WARNING,"Unable to accept trunked packet from '%s:%d': No matching peer\n", inet_ntoa(sin.sin_addr),ntohs(sin.sin_port));
ast_log(LOG_WARNING,"Unable to accept trunked packet from '%s:%d': No matching peer\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),ntohs(sin.sin_port));
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected call to %s, format 0x%x incompatible with our capability 0x%x.\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->peerformat,iaxs[fr.callno]->capability);
ast_log(LOG_NOTICE,"Rejected call to %s, format 0x%x incompatible with our capability 0x%x.\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->peerformat,iaxs[fr.callno]->capability);
}else{
iaxs[fr.callno]->state|=IAX_STATE_STARTED;
if(iaxs[fr.callno]->owner){
@ -5337,7 +5356,7 @@ retryowner2:
iaxs[fr.callno]->lag=ts-fr.ts;
if(option_debug)
ast_log(LOG_DEBUG,"Peer %s lag measured as %dms\n",
ast_log(LOG_NOTICE,"Host %s failed to authenticate as %s\n", inet_ntoa(iaxs[fr.callno]->addr.sin_addr),iaxs[fr.callno]->username);
ast_log(LOG_NOTICE,"Host %s failed to authenticate as %s\n",ast_inet_ntoa(iabuf,sizeof(iabuf),iaxs[fr.callno]->addr.sin_addr),iaxs[fr.callno]->username);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected connect attempt from %s, request '%s@%s' does not exist\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
memset(&ied0,0,sizeof(ied0));
iax_ie_append_str(&ied0,IAX_IE_CAUSE,"No such context/extension");
ast_log(LOG_NOTICE,"Rejected dial attempt from %s, request '%s@%s' does not exist\n", inet_ntoa(sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
ast_log(LOG_NOTICE,"Rejected dial attempt from %s, request '%s@%s' does not exist\n",ast_inet_ntoa(iabuf,sizeof(iabuf),sin.sin_addr),iaxs[fr.callno]->exten,iaxs[fr.callno]->context);
memset(&ied0,0,sizeof(ied0));
iax_ie_append_str(&ied0,IAX_IE_CAUSE,"No such context/extension");
@ -934,13 +937,14 @@ static int mgcp_show_endpoints(int fd, int argc, char *argv[])
structmgcp_gateway*g;
structmgcp_endpoint*e;
inthasendpoints=0;
chariabuf[80];
if(argc!=3)
returnRESULT_SHOWUSAGE;
ast_mutex_lock(&gatelock);
g=gateways;
while(g){
e=g->endpoints;
ast_cli(fd,"Gateway '%s' at %s (%s)\n",g->name,g->addr.sin_addr.s_addr? inet_ntoa(g->addr.sin_addr): inet_ntoa(g->defaddr.sin_addr),g->dynamic?"Dynamic":"Static");
ast_cli(fd,"Gateway '%s' at %s (%s)\n",g->name,g->addr.sin_addr.s_addr?ast_inet_ntoa(iabuf,sizeof(iabuf),g->addr.sin_addr):ast_inet_ntoa(iabuf,sizeof(iabuf),g->defaddr.sin_addr),g->dynamic?"Dynamic":"Static");
ast_verbose(VERBOSE_PREFIX_3"Registered MGCP gateway '%s' at %s port %d\n",g->name, inet_ntoa(g->addr.sin_addr),ntohs(g->addr.sin_port));
ast_verbose(VERBOSE_PREFIX_3"Registered MGCP gateway '%s' at %s port %d\n",g->name,ast_inet_ntoa(iabuf,sizeof(iabuf),g->addr.sin_addr),ntohs(g->addr.sin_port));
ast_log(LOG_DEBUG,"Target address %s is not local, substituting externip\n",t);
}
elseif(bindaddr.sin_addr.s_addr)
@ -655,14 +657,15 @@ static int retrans_pkt(void *data)
{
structsip_pkt*pkt=data,*prev,*cur;
intres=0;
chariabuf[80];
ast_mutex_lock(&pkt->owner->lock);
if(pkt->retrans<MAX_RETRANS){
pkt->retrans++;
if(sip_debug_test_pvt(pkt->owner)){
if(pkt->owner->nat==SIP_NAT_ALWAYS)
ast_verbose("Retransmitting #%d (NAT):\n%s\n to %s:%d\n",pkt->retrans,pkt->data, inet_ntoa(pkt->owner->recv.sin_addr),ntohs(pkt->owner->recv.sin_port));
ast_verbose("Retransmitting #%d (NAT):\n%s\n to %s:%d\n",pkt->retrans,pkt->data,ast_inet_ntoa(iabuf,sizeof(iabuf),pkt->owner->recv.sin_addr),ntohs(pkt->owner->recv.sin_port));
else
ast_verbose("Retransmitting #%d (no NAT):\n%s\n to %s:%d\n",pkt->retrans,pkt->data, inet_ntoa(pkt->owner->sa.sin_addr),ntohs(pkt->owner->sa.sin_port));
ast_verbose("Retransmitting #%d (no NAT):\n%s\n to %s:%d\n",pkt->retrans,pkt->data,ast_inet_ntoa(iabuf,sizeof(iabuf),pkt->owner->sa.sin_addr),ntohs(pkt->owner->sa.sin_port));
}
append_history(pkt->owner,"ReTx",pkt->data);
__sip_xmit(pkt->owner,pkt->data,pkt->packetlen);
@ -837,11 +840,12 @@ static int __sip_semi_ack(struct sip_pvt *p, int seqno, int resp)
ast_verbose("%sTransmitting (NAT):\n%s\n to %s:%d\n",reliable?"Reliably ":"",req->data, inet_ntoa(p->recv.sin_addr),ntohs(p->recv.sin_port));
ast_verbose("%sTransmitting (NAT):\n%s\n to %s:%d\n",reliable?"Reliably ":"",req->data,ast_inet_ntoa(iabuf,sizeof(iabuf),p->recv.sin_addr),ntohs(p->recv.sin_port));
else
ast_verbose("%sTransmitting (no NAT):\n%s\n to %s:%d\n",reliable?"Reliably ":"",req->data, inet_ntoa(p->sa.sin_addr),ntohs(p->sa.sin_port));
ast_verbose("%sTransmitting (no NAT):\n%s\n to %s:%d\n",reliable?"Reliably ":"",req->data,ast_inet_ntoa(iabuf,sizeof(iabuf),p->sa.sin_addr),ntohs(p->sa.sin_port));
}
if(reliable){
append_history(p,"TxRespRel",req->data);
@ -859,11 +863,12 @@ static int send_response(struct sip_pvt *p, struct sip_request *req, int reliabl
ast_verbose("%sTransmitting:\n%s (NAT) to %s:%d\n",reliable?"Reliably ":"",req->data, inet_ntoa(p->recv.sin_addr),ntohs(p->recv.sin_port));
ast_verbose("%sTransmitting:\n%s (NAT) to %s:%d\n",reliable?"Reliably ":"",req->data,ast_inet_ntoa(iabuf,sizeof(iabuf),p->recv.sin_addr),ntohs(p->recv.sin_port));
else
ast_verbose("%sTransmitting:\n%s (no NAT) to %s:%d\n",reliable?"Reliably ":"",req->data, inet_ntoa(p->sa.sin_addr),ntohs(p->sa.sin_port));
ast_verbose("%sTransmitting:\n%s (no NAT) to %s:%d\n",reliable?"Reliably ":"",req->data,ast_inet_ntoa(iabuf,sizeof(iabuf),p->sa.sin_addr),ntohs(p->sa.sin_port));
snprintf(query,sizeof(query),"SELECT name, secret, context, username, ipaddr, port, regseconds FROM sipfriends WHERE ipaddr=\"%s\" AND port=\"%d\"", inet_ntoa(sin->sin_addr),ntohs(sin->sin_port));
snprintf(query,sizeof(query),"SELECT name, secret, context, username, ipaddr, port, regseconds FROM sipfriends WHERE ipaddr=\"%s\" AND port=\"%d\"",ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr),ntohs(sin->sin_port));
else
snprintf(query,sizeof(query),"SELECT name, secret, context, username, ipaddr, port, regseconds FROM sipfriends WHERE name=\"%s\"",name);
ast_verbose(VERBOSE_PREFIX_3"Registered SIP '%s' at %s port %d expires %d\n",p->name, inet_ntoa(p->addr.sin_addr),ntohs(p->addr.sin_port),expiry);
ast_verbose(VERBOSE_PREFIX_3"Registered SIP '%s' at %s port %d expires %d\n",p->name,ast_inet_ntoa(iabuf,sizeof(iabuf),p->addr.sin_addr),ntohs(p->addr.sin_port),expiry);
}
/* Save User agent */
@ -4528,6 +4549,7 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si
intres=-1;
structsip_peer*peer;
chartmp[256]="";
chariabuf[80];
char*name,*c;
char*t;
/* Terminate URI */
@ -4547,7 +4569,7 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si
name=c+4;
}else{
name=c;
ast_log(LOG_NOTICE,"Invalid to address: '%s' from %s (missing sip:) trying to use anyway...\n",c, inet_ntoa(sin->sin_addr));
ast_log(LOG_NOTICE,"Invalid to address: '%s' from %s (missing sip:) trying to use anyway...\n",c,ast_inet_ntoa(iabuf,sizeof(iabuf),sin->sin_addr));
ast_log(LOG_NOTICE,"Dunno anything about a %d %s response from %s\n",resp,rest,p->owner?p->owner->name: inet_ntoa(p->sa.sin_addr));
ast_log(LOG_NOTICE,"Dunno anything about a %d %s response from %s\n",resp,rest,p->owner?p->owner->name:ast_inet_ntoa(iabuf,sizeof(iabuf),p->sa.sin_addr));