func: static void start_rtp(struct skinny_subchannel *sub) struct skinny_line * l = sub -> line ; struct skinny_device * d = l -> device ; int hasvideo = 0 ; sub -> rtp = ast_rtp_instance_new ( "asterisk" , sched , & bindaddr_tmp , NULL ); if ( hasvideo )  sub -> vrtp = ast_rtp_instance_new ( "asterisk" , sched , & bindaddr_tmp , NULL ); transmit_connect ( d , sub ); static void transmit_connect(struct skinny_device *d, struct skinny_subchannel *sub) struct skinny_req * req ; struct skinny_line * l = sub -> line ; struct ast_format_list fmt ; if ( ! ( req = req_alloc ( sizeof ( struct open_receive_channel_message ) , OPEN_RECEIVE_CHANNEL_MESSAGE ) ) )  static struct skinny_req *req_alloc(size_t size, int response_message) struct skinny_req * req ; if ( ! ( req = ast_calloc ( 1 , skinny_header_size + size + 4 ) ) )  return NULL ; req -> len = htolel ( size + 4 ); req -> e = htolel ( response_message ); return req ; fmt = ast_codec_pref_getsize ( & l -> prefs , & tmpfmt ); req -> data . openreceivechannel . conferenceId = htolel ( sub -> callid ); req -> data . openreceivechannel . partyId = htolel ( sub -> callid ); req -> data . openreceivechannel . packets = htolel ( fmt . cur_ms ); req -> data . openreceivechannel . capability = htolel ( codec_ast2skinny ( & fmt . format ) ); static int codec_ast2skinny(const struct ast_format *astcodec) switch ( astcodec -> id )  return SKINNY_CODEC_ALAW ; return SKINNY_CODEC_ULAW ; return SKINNY_CODEC_G723_1 ; return SKINNY_CODEC_G729A ; return SKINNY_CODEC_G726_32 ; return SKINNY_CODEC_H261 ; return SKINNY_CODEC_H263 ; return 0 ; req -> data . openreceivechannel . echo = htolel ( 0 ); req -> data . openreceivechannel . bitrate = htolel ( 0 ); 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 )  skinny_unregister ( NULL , s ); ast_mutex_unlock ( & s -> lock ); 