func: static void *skinny_newcall(void *data) struct ast_channel * c = data ; struct skinny_subchannel * sub = c -> tech_pvt ; struct skinny_line * l = sub -> line ; struct skinny_device * d = l -> device ; c -> connected . id . number . valid = 1; c -> connected . id . number . str = ast_strdup ( c -> exten ); res = ast_pbx_run ( c ); if ( res )  transmit_start_tone ( d , SKINNY_REORDER , l -> instance , sub -> callid ); static void transmit_start_tone(struct skinny_device *d, int tone, int instance, int reference) struct skinny_req * req ; if ( ! ( req = req_alloc ( sizeof ( struct start_tone_message ) , START_TONE_MESSAGE ) ) )  req -> data . starttone . tone = htolel ( tone ); req -> data . starttone . instance = htolel ( instance ); req -> data . starttone . reference = htolel ( reference ); transmit_response ( d , req ); static void transmit_response(struct skinny_device *d, struct skinny_req *req) transmit_response_bysession ( d -> session , req ); static int transmit_response_bysession(struct skinnysession *s, struct skinny_req *req) if ( ! s )  if ( ( letohl ( req -> len ) > SKINNY_MAX_PACKET ) || ( letohl ( req -> len ) < 0 ) )  memset ( s -> outbuf , 0 , sizeof ( s -> outbuf ) ); memcpy ( s -> outbuf , req , skinny_header_size ); memcpy ( s -> outbuf + skinny_header_size , & req -> data , letohl ( req -> len ) ); res = write ( s -> fd , s -> outbuf , letohl ( req -> len ) + 8 ); if ( res != letohl ( req -> len ) + 8 )  ast_log ( LOG_WARNING , "Transmit: write only sent %d out of %d bytes: %s\n" , res , letohl ( req -> len ) + 8 , strerror ( errno ) ); if ( res == - 1 )  