add: print_contacts(cb->contacts);
context: static int vm_start(struct sip_msg* msg, char* str1, char* str2){    str    body;    char  cmd[2048];    unsigned int hash_index;    unsigned int label;    contact_body_t* cb;    str*  str_uri=0;    char query_buf[256];    char email_buf[256];    db_res_t* email_res=0;    db_handle = db_init(vm_db_url);    if(init_tmb())	goto error;    if( (*_tmb.t_get_trans_ident)(msg,&hash_index,&label) == -1 ) {	LOG(L_ERR,"ERROR: vm_start: t_get_trans_ident failed\n");	goto error;    }    if(vm_extract_body(msg,&body)==-1)	goto error;    //strcpy(srcip,ip_addr2a(&msg->rcv.src_ip));    //strcpy(dstip,ip_addr2a(&msg->rcv.dst_ip));    if(parse_from_header(msg) == -1){	LOG(L_ERR,"ERROR: %s : vm_start: while parsing <From:> header\n",exports.name);	goto error;    }    if(!msg->parsed_uri_ok){  	LOG(L_ERR,"ERROR: %s : vm_start: uri has not been parsed\n",exports.name);  	goto error;    }    if(msg->contact){	if(parse_contact(msg->contact) == -1){	    LOG(L_ERR,"ERROR: %s : vm_start: while parsing <Contact:> header\n",exports.name);	    goto error;	}		DBG("DEBUG: vm_start: ******* contacts: *******\n");	cb = msg->contact->parsed;	if(cb) {	    contact_t* c=cb->contacts;	    str_uri = &c->uri;	    	    for(; c; c=c->next)		DBG("DEBUG:           %.*s\n",c->uri.len,c->uri.s);	}	DBG("DEBUG: vm_start: **** end of contacts ****\n");    }    if(!str_uri || !str_uri->len)	str_uri = &(get_from(msg)->uri);	    if(msg->route)	DBG("DEBUG: vm_start: route:%.*s\n",msg->route->body.len,msg->route->body.s);    if( snprintf( query_buf,256,  		  "SELECT email_address FROM subscriber WHERE user_id = '%.*s'",  		  msg->parsed_uri.user.len,msg->parsed_uri.user.s ) < 0 )    {  	LOG(L_ERR,"ERROR: %s: snprintf failed\n",exports.name);  	return -1;    }     (*db_raw_query)(db_handle,query_buf,&email_res);    if( (!email_res) || (email_res->n != 1) ){  	LOG( L_ERR,"ERROR: %s: no email for user '%.*s'",  	     exports.name,  	     msg->parsed_uri.user.len,msg->parsed_uri.user.s);  	return -1;    }    strcpy(email_buf,VAL_STRING(&(email_res->rows[0].values[0])));    (*db_free_query)(db_handle,email_res);    if ( snprintf(cmd,2048,		  "invite\n"		  "%.*s\n"  // user		  "%s\n"    // email		  "%s\n"    // dst ip		  "%.*s\n"  // from uri		  "%.*s\n"  // from		  "%.*s\n"  // to		  "%.*s\n"  // call-id		  "%.*s\n"  // from-tag [optional]		  "%.*s\n"  // to-tag [optional]		  "%.*s\n"  // cseq		  "%u:%u\n" // hash_index label [optional]		  "%.*s\n"  // route [optional]		  "%.*s\n", // body [optional]		  msg->parsed_uri.user.len,msg->parsed_uri.user.s,		  email_buf,		  ip_addr2a(&msg->rcv.dst_ip),		  str_uri->len,str_uri->s, // from-uri   		  get_from(msg)->body.len,get_from(msg)->body.s, // from		  msg->to->body.len,msg->to->body.s,		  msg->callid->body.len,msg->callid->body.s,		  get_from(msg)->tag_value.len,get_from(msg)->tag_value.s,		  get_to(msg)->tag_value.len,get_to(msg)->tag_value.s,		  get_cseq(msg)->number.len,get_cseq(msg)->number.s,		  hash_index,label,		  msg->route ? msg->route->body.len : 0, msg->route ? msg->route->body.s : "",// route		  body.len,body.s ) < 0 )     {	LOG(L_ERR,"ERROR: %s: snprintf failed\n",exports.name);	goto error;    }#ifdef _VM_EXTRA_DBG    DBG("DEBUG: vm_start: sending `%s'\n", cmd);#endif    return write_to_vm_fifo(cmd,strlen(cmd)); error:    return 0; // !OK}