fixing two issues: casting the received (from janus)string  out_port to an integer number, also fixing a bug in send_packet_out function